Page 1 of 1

anyway to make a field or button delete itself

Posted: Sun Oct 30, 2011 9:53 pm
by kcwvc52
I have tried to create and external button and make it wait 30 ticks but it just seems like livecode has no way of allowing a single field or button to delete itself. it throws an error and says that the script is still executing but i do not care all the important stuff is done and i want it to delete itself.

Re: anyway to make a field or button delete itself

Posted: Sun Oct 30, 2011 9:57 pm
by Mark
Hi,

Code: Select all

// stack script:
on deleteObject theObject
  delete theObject
end deleteObject

// object script:
on deleteMe
  put the long id of me into myObject
  send "delete myObject" to this stack in 0 millisecs
end deleteMe
Best,

Mark