Deleting button while executing it's script
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Deleting button while executing it's script
Hello: what is the best way to handle this? I need to delete a button from it's own script, but you can't delete an object whose script holds a currently executing handler.
Re: Deleting button while executing it's script
Hi Greg,
handle the deletion in the card script, something like this:
In the button:
Tested and works
Best
Klaus
handle the deletion in the card script, something like this:
Code: Select all
command delete_button tName
if there is a btn tName then
delete btn tName
end if
end delete_button
Code: Select all
on mouseup
## your stuff here
put the short name of me into tName
send "delete_button tName" to this cd in 1
end mouseup

Best
Klaus
-
- Posts: 349
- Joined: Tue Oct 28, 2008 1:23 am
- Contact:
Re: Deleting button while executing it's script
Thanks Klaus. that will work