Newbie Puzzled by Deleting Card

Jamie K Meta at Dimensional.com
Thu Oct 31 14:28:00 EST 2002


There are a few things that are not immediately obvious about Rev. These 
sorts of things make certain operations several steps more difficult 
than you might expect, at first. That's the essence of Rev's learning 
curve. While the information is usually in the documentation somewhere, 
sometimes you have dig for it without necessarily knowing exactly what 
you're seeking. As more examples, tutorials and cookbook material become 
available it will become easier to more quickly understand some of Rev's 
design constraints and features and how to accomplish "simple" things.

For example, to make a typical HyperCard-like stack where multiple cards 
share the same elements, you must _group_ objects that you want to 
appear on each card, such as buttons and fields, and then enable 
Background Behaviour for the group.

Once you do that, a delete button that's a member of the background 
group can work to delete the current card as you would expect.

Best Regards,
 -Jamie (HyperSense documentation author) Krutz



Ken Ray wrote:

>Dave,
>
>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 sonsothunder.com
>Web Site: http://www.sonsothunder.com/
>
>----- Original Message -----
>From: <dave.mckee at shaw.ca>
>To: <use-revolution at lists.runrev.com>
>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
>>    
>>
>error;
>  
>
>> . 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 lists.runrev.com
>>http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>    
>>
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution
>
>  
>






More information about the use-livecode mailing list