How can I delete an object when clicked?

Phil Davis revdev at pdslabs.net
Sat Jul 24 16:11:45 EDT 2010


Hi Bill,
Try this:

on mouseUp
    send ("delete" && the long name of me) to this card in 0 secs
end mouseUp

That will:
1) allow the current handler to quit executing before the delete is 
attempted.
2) let the delete be done by an object not being deleted.

Phil



On 7/24/10 12:59 PM, Bill Vlahos wrote:
> I have an object (in this case an image) on a card that I want the user to delete.
>
> If I put the following script into the image, Rev complains that the script is still executing so it won't complete.
> on mouseUp
>     delete me
> end mouseUp
>
> Error: (Object: stack locked, or object's script is executing)
>
> Bill Vlahos
>    

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net




More information about the use-livecode mailing list