Problem with wait with messages

David Bovill david at openpartnership.net
Mon Jul 9 19:57:58 CDT 2007


Ken - what you suggest works...

but does wait with messages or wait for messages actually work? I have never
got it working - nor have I seen any example scripts with it working - and
the docs etc all point to doing it "another way" :)

On 09/07/07, Ken Ray <kray at sonsothunder.com> wrote:
>
> On Mon, 9 Jul 2007 21:41:45 +0100, Dave wrote:
>
> > Hi All,
> >
> > I have a handler that gets called on a regular basis via the "send
> > xxx in N seconds"  command.
> >
> > The handler then does some processing, but but wait for a task to
> > complete, to do the wait I use:
> >
> > if TaskNotDone = true then
> >    wait 1 second with messages
> > end if
> >
> > I thought that this would allow other objects in the stack to
> > function, but this is not the case.
> >
> > How can I make it so that I can wait for the task to complete but
> > allow the rest of the GUI to work?
>
> I'd recommend the "wait until <condition>" method... So for example,
> suppose you made "TaskDone" a global variable (I'll call it
> "gTaskDone"). You can initially set gTaskDone to false, then execute
> your "send in..." and then immediately after it put:
>
>   wait until gTaskDone is true
>
> Just be careful, because if gTaskDone is never set to true, the script
> won't ever continue and you'll have issues... :-)
>
> HTH,
>
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list