Small onError/onDone event fix
This commit is contained in:
@@ -435,14 +435,14 @@ return function(name, parent)
|
|||||||
local function resumeProcess(self, event, ...)
|
local function resumeProcess(self, event, ...)
|
||||||
local ok, result = curProcess:resume(event, ...)
|
local ok, result = curProcess:resume(event, ...)
|
||||||
if (ok==false)and(result~=nil)and(result~="Terminated")then
|
if (ok==false)and(result~=nil)and(result~="Terminated")then
|
||||||
local val = self:sendEvent("program_error", self, result)
|
local val = self:sendEvent("program_error", result)
|
||||||
if(val~=false)then
|
if(val~=false)then
|
||||||
error("Basalt Program - "..result)
|
error("Basalt Program - "..result)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(curProcess:getStatus()=="dead")then
|
if(curProcess:getStatus()=="dead")then
|
||||||
self:sendEvent("program_done", self)
|
self:sendEvent("program_done")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -540,6 +540,7 @@ return function(name, parent)
|
|||||||
pWindow.setBackgroundColor(self.bgColor)
|
pWindow.setBackgroundColor(self.bgColor)
|
||||||
pWindow.setTextColor(self.fgColor)
|
pWindow.setTextColor(self.fgColor)
|
||||||
pWindow.basalt_setVisible(true)
|
pWindow.basalt_setVisible(true)
|
||||||
|
|
||||||
resumeProcess(self)
|
resumeProcess(self)
|
||||||
paused = false
|
paused = false
|
||||||
if(self.parent~=nil)then
|
if(self.parent~=nil)then
|
||||||
|
|||||||
Reference in New Issue
Block a user