Re-2: abort scripts

Ken Ray kray at sonsothunder.com
Wed Jun 13 17:12:37 EDT 2007


On Wed, 13 Jun 2007 19:01:37 +0000, runrev260805 at m-r-d.de wrote:

> Thanks Jim,
> thanks Kray,
> 
> that did it.
> 
> Let´s assume i have a stack with 4 buttons. 1 Button just quits the 
> app. How could i close(destroy) the stack, if one handler of one of 
> the 3 other buttons is active and i don´t know which button was 
> pressed. 
> 
> Should i include something like "put the name of me into btnName" in 
> the mouseup handler of this 3 buttons?  I could then check the global 
> var btnName and i know which button was pressed. Or does Revolution 
> has an internal function for that.

No, you're right on how to handle that. Normally "the target" would 
tell you the last button pressed, but as soon as you click the button 
that closes the app, the target changes to that button instead.

I'm assuming that the code in the other three buttons are asynchronous 
in some way so that you actually *can* click the fourth button while 
another button's script is running?

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list