Posted 07 January 2013 - 09:03 AM
If not caught, how long will an even linger around?
I am generally using a code like the following to do stuff:
which works fine in most cases. But if we imagine a situation where the part after pullEvent takes a longer time, I suppose it will be possible to miss events. How long, for instance, a key press remains as an even that can be caught? Also is there a way to put events on hold while having the computer do other things?
I am generally using a code like the following to do stuff:
while true do
e={os.pullEvent()}
if e[1]=='rednet_message' then
--do stuff--
end
if e[1]=='timer' then
--do stuff--
end
if e[1]=='monitor_touch' then
--do stuff--
end
end
which works fine in most cases. But if we imagine a situation where the part after pullEvent takes a longer time, I suppose it will be possible to miss events. How long, for instance, a key press remains as an even that can be caught? Also is there a way to put events on hold while having the computer do other things?