Restart a handler by a message

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
ToreT
Posts: 14
Joined: Sat Jan 27, 2007 8:41 pm

Restart a handler by a message

Post by ToreT »

How do I pause a handler and continue it by using: wait until ..... some message is sent from another handler or button script?
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark »

Dear ToreT,

I would have the "other" handler set a custom property or global variable. This allows you to do the following

on foo
-- do something here
wait until the cCustomProp of me is true with messages
-- continue here
end foo

In the "other" handler you would have:

on bla
-- do something and set property when ready
set the cCustomProp of me to true
end bla

I don't know whether this is helpful. Maybe you want to post your scripts or explain a little more about what you are doing?

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
ToreT
Posts: 14
Joined: Sat Jan 27, 2007 8:41 pm

Post by ToreT »

Hi,

thanks, I think your answer is relevant, didn not work right away. Have to try more tomorrow, now I have to go and listen to some JAZZ with my woman.

Have a nice evening
Tore
Post Reply