Deleting an object with a "bank shot'

T. R. Ponn alptex2 at orwell.net
Thu Aug 7 10:13:01 EDT 2003


Hello all!

I'm attempting to delete an object when I click on it.  Of course...no 
can do a frontal lobotomy on yourself...so, I'm trying to use the send 
"in time" structure to send a message to the card that the object is on. 
 These are the handlers:

in the card:

on wackIt thisOne
     delete thisOne
end wackIt

in the btn I want to delete:

on mouseUp
     do "send wackIt ("&quote&"btn id"&&the id of me&quote&") to 
card"&&quote&"PGM Builder"&quote&&"in 1 tick"
end mouseUp


I've checked the mouseUp handler by substituting "put" for "do", and 
what I get in the msg box looks ok:

send wackIt ("btn id 1297") to card "PGM Builder" in 1 tick

But I get an error when attempting to execute the above from the msg box.


I know the "wackIt" handler is ok, because I've executed this from the 
msg box successfully:

wackIt ("btn id 1297")


It seems to me that the send "in time" doesn't have the ability to pass 
the parameter.  Is this the problem?  Should I be using a "function" 
structure instead of the "on" structure?  I know I could accomplish this 
by using a global var, but this just seems more straight forward.

Thanks in advance for any assistance!

Best Regards,

Tim Ponn




More information about the use-livecode mailing list