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.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to