Best way to repeat on a timer?

RGould8 at aol.com RGould8 at aol.com
Fri Aug 8 09:10:01 EDT 2003


I've got an app that needs to poll the user's network settings every 3 
seconds.   I'm presently doing this by calling a unix command via the shell command 
in Revolution on Mac OS X.

The problem I'm having is that, while this seems to work, it makes dragging 
the application window very jittery when the app is running.   I suspect this 
is because I might be creating a memory-hogging timer loop.   Here's what I'm 
doing:

on opencard
      send "checkstatus" to this stack
end opencard


on checkstatus
      put shell(unixcallgoeshere) into field "status result"
      send "checkstatus" to this stack in 3 seconds
end checkstatus


The unix call I'm using spits back it's result instantaneously, so there 
shouldn't be a backlog via the unix side of things.   Is it bad to have a handler 
call itself via a timer - - - does that create some sort of "nesting" problem?
    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20030808/da57c506/attachment.html>


More information about the use-livecode mailing list