- Add log
This commit is contained in:
@@ -31,7 +31,7 @@ local getCHN=love.thread.newChannel()
|
||||
local setCHN=love.thread.newChannel()
|
||||
local triggerCHN=love.thread.newChannel()
|
||||
|
||||
clipboard_thread:start(getCHN,setCHN,triggerCHN)
|
||||
TASK.new(function() TEST.yieldN(26); print("1"); clipboard_thread:start(getCHN,setCHN,triggerCHN) end)
|
||||
|
||||
local clipboard={}
|
||||
|
||||
@@ -45,6 +45,12 @@ end
|
||||
|
||||
function clipboard._update()
|
||||
triggerCHN:push(0)
|
||||
local error = clipboard_thread:getError()
|
||||
if error then
|
||||
MES.new('error',error)
|
||||
MES.traceback()
|
||||
clipboard._update=NULL
|
||||
end
|
||||
end
|
||||
|
||||
return clipboard
|
||||
@@ -3,7 +3,9 @@ local getCHN,setCHN,triggerCHN=...
|
||||
local CHN_demand,CHN_getCount=triggerCHN.demand,triggerCHN.getCount
|
||||
local CHN_push,CHN_pop=triggerCHN.push,triggerCHN.pop
|
||||
|
||||
print("2");
|
||||
JS=require'Zframework.js'
|
||||
print("3");
|
||||
|
||||
local yield=coroutine.yield
|
||||
local setThread=coroutine.wrap(function()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
__requestQueue = {}
|
||||
_requestCount = 0
|
||||
_Request =
|
||||
local __requestQueue = {}
|
||||
local _requestCount = 0
|
||||
local _Request =
|
||||
{
|
||||
command = "",
|
||||
currentTime = 0,
|
||||
@@ -11,10 +11,10 @@ local os = love.system.getOS()
|
||||
local __defaultErrorFunction = nil
|
||||
local isDebugActive = false
|
||||
|
||||
JS = {}
|
||||
local JS = {}
|
||||
|
||||
function JS.callJS(funcToCall)
|
||||
if(os == "Web") then
|
||||
if os == "Web" then
|
||||
print("callJavascriptFunction " .. funcToCall)
|
||||
end
|
||||
end
|
||||
@@ -23,16 +23,10 @@ end
|
||||
--If you pass arguments to the func beyond the string, it will perform automatically string.format
|
||||
--Return statement is possible inside this structure
|
||||
--This will return a string containing a function to be called by JS.callJS
|
||||
local _unpack
|
||||
if(_VERSION == "Lua 5.1" or _VERSION == "LuaJIT") then
|
||||
_unpack = unpack
|
||||
else
|
||||
_unpack = table.unpack
|
||||
end
|
||||
function JS.stringFunc(str, ...)
|
||||
str = "(function(){"..str.."})()"
|
||||
if(#arg > 0) then
|
||||
str = str:format(_unpack(arg))
|
||||
str = str:format(unpack(arg))
|
||||
end
|
||||
str = str:gsub("[\n\t]", "")
|
||||
return str
|
||||
|
||||
Reference in New Issue
Block a user