Delete card loop crashes Rev

Dar Scott dsc at swcp.com
Sun Dec 12 01:45:38 EST 2004


On Dec 11, 2004, at 9:17 PM, Sivakatirswami wrote:

> on mouseup
>   Answer "You are about to delete all data except card 1! This is 
> unrecoverable!" with "Cancel" or "Proceed"
>   if it is "Cancel" then exit mouseup
>   lock screen
>   put the number of cards of this stack into tLoops
>   go to card tLoops
>   repeat (tLoops-1) times
>    delete this card
>   end repeat
> end mouseup
>
> which consistently causes Rev to crash on Mac OSX

I put that script in a button on card one in an 8 card stack.  It 
deleted card 8 and then tried to delete card 1 and got an error because 
the script is on that card.  No crash though.

I changed the 'go to card tLoops' line to 'go to card 2' and it worked. 
  Maybe deleting this card moves this card to a different card than it 
did.

Dar

****************************************
     Dar Scott Consulting
     http://www.swcp.com/dsc/
     Programming Services
****************************************



More information about the use-livecode mailing list