Suicide

Paul Dupuis paul at researchware.com
Sat Aug 27 07:55:08 EDT 2016


On 8/27/2016 7:27 AM, Richmond wrote:
> on mouseUp
>    delete me
> end mouseUp 

The engine can not delete an object whose script is currently executing.
This has been a long know issue in LiveCode, but I am not sure it has
been documented

In the Dictionary for "Delete" there is a warning: "Important!  You
cannot delete the object whose script holds a currently executing
handler." but no explaination of the typical work-around below.

on mouseUp
  put the long id of me into tTarget
  send "delete tTarget" to me in 0 ticks
end mouseUp

So I guess you have to use "Assisted Suicide" since you need to send a
message to the engine to delete the object after it's script is done.




More information about the use-livecode mailing list