Hi David,

> In celebration of all the amazing new features in 2.32 and Metacard's
> forthcoming 8th anniversary - I announce todays competition....
> 
>   1) How do you script a button so that when you click on it it deletes
> itself?
> 
> Answers in the post please, prizes available on request!
> 
It is impossible to delete a control while its script is running ;-)

You all might have made this experience,
if you "coded your first thought" ;-)

So the delete-script must be evoked from somewhere else
AND with a little delay!

I had big successes with these scripts ;-)
It works, but there may be other solutions...

on mouseup
  send "loeschen" to this cd in 1 secs     #millisecs will do, too...
#one could add an argument like "the number of me" or stuff...
#send "loeschen" && the number of me...
end mouseup

Card script:
on loeschen       #loeschen means delete in german...
  delete btn 1
end loeschen

or with an argument:
on loeschen what
  delete btn what
end loeschen

Works fine...
...but no commercial potential... :-)


Regards from germany

Klaus Major


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to