timer update

This commit is contained in:
p.kosyh 2010-01-21 08:17:05 +00:00
parent b2a5cf808e
commit a731ee538c
2 changed files with 9 additions and 6 deletions

View file

@ -6,11 +6,14 @@ stead = {
io = io, io = io,
call_top = 0, call_top = 0,
cctx = { txt = nil, self = nil }, cctx = { txt = nil, self = nil },
timer = function(s) timer = function()
return false if type(timer) == 'table' and type(timer.callback) == 'function' then
return timer:callback();
end
return
end, end,
input = function(s) input = function(pressed, event)
return false return
end, end,
} }
@ -1816,7 +1819,7 @@ function delete(v)
allocator:delete(v); allocator:delete(v);
end end
timer = obj { timer = obj { -- timer calls stead.timer callback
nam = 'timer', nam = 'timer',
ini = function(s) ini = function(s)
if s._timer ~= nil and s._timer ~= 0 then if s._timer ~= nil and s._timer ~= 0 then