Wait command

dunbarx at aol.com dunbarx at aol.com
Sun Mar 2 21:32:28 EST 2014


There are very legitimate places for "wait", though more robust code can usually be written with "send (in time)". This has been going on for 27 years.


Wait is blocking. An idle handler will be locked out just like everything else.



But a line like "wait 0 with messages does not seem to me to do much. Maybe retard the flow of execution a few microseconds?


Craig



-----Original Message-----
From: Robert Sneidar <slylabs13 at me.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Sun, Mar 2, 2014 9:13 pm
Subject: Re: Wait command


Only reason I can think to put a wait command in a running script is to give a 
change for an on idle handler to be triggered. If you DO have an idle handler 
running somewhere and IT has a problem that causes the engine to exit to top, 
that might be your bugaboo.

Bob


On Mar 2, 2014, at 5:47 PM, Peter Haworth <pete at lcsql.com> wrote:

> I just spent a couple of hours debugging some code and narrowed it down to
> a "wait 0 with messages" command.
> 
> WIth that command in my script, nothing after it seems to get executed.
> When I take that command out, all works fine.
> 
> I'm obviously misunderstanding how the wait command works.  I assumed it
> would wait the specified amount of time, then continue executing commands
> following it in the script.
> 
> I have to admit, I'm not sure why the wait command is in the script in the
> first place but I'd grateful for any clarification of how "wait" works.
> 
> Thanks,
> 
> Pete
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 




More information about the use-livecode mailing list