Newbie Puzzled by Deleting Card

Ken Ray kray at
Thu Oct 31 13:56:00 EST 2002


The problem is you can't delete the card because the button's script is
running and the button is on the card you're trying to delete. The simple
approach is a "send" command that is delayed a few milliseconds; just long
enough for the button's script to complete. Something like:

on mouseUp
  send "delete this card" to this card in 10 milliseconds
end mouseUp

Ken Ray
Sons of Thunder Software
Email: kray at
Web Site:

----- Original Message -----
From: <dave.mckee at>
To: <use-revolution at>
Sent: Thursday, October 31, 2002 11:47 AM
Subject: Newbie Puzzled by Deleting Card

> I have OS 10.2.1 running and am trying out revolution 1.1.1 and have run
into something strange;
> If I have 2 cards and each card has one button with the following script;
> on mouseup
>   delete this card
> end mouseup
> and then if I click on the button on either card, I get the following
>  . There was an Execution Error at 9:45:15 AM
> Error description:  Chunk: can't delete object
> Object: button id 1005 of card id 1004 of stack "Untitled 1"
> --------------------
> delete this card
> --------------------
> Value: mouseup
> What am I doing wrong ?  There must be something so painfully obvious
about this that I just can not see why the script produces an error.
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the use-livecode mailing list