Naming a card
Dave Cragg
dcragg at lacscentre.co.uk
Thu Apr 4 18:14:01 EST 2002
At 4:49 pm -0500 4/4/02, Zac Elston wrote:
>after trying to rename the cards several times and working through the debug
>window I can see cards 1-31 are named...but that's it...not 32-on. which
>shows me it might have worked .the script seems to be hanging on the "set
>the name of card part". but it doesn't actually error. I see really large
>values in the debug time window though for that line though. anyone have an
>idea? it looks simple enough
>
>make 100 cards and try it
>
>put the cardnames of this stack into MyCards
>put 1 into MyX
>repeat for each line MyLine in MyCards
> set the name of card MyLine to "Page" & MyX
>put MyX +1 into MyX
>end repeat
Could it be that the cards after 32 don't have names? The cardnames
returns the id of the card if it doesn't have a name, for example
"card id 1004".
Use the number of the cards instead:
put the number of cards of this stack into tNumCards
repeat with i = 1 to tNumCards
set the name of card i to "Page" & i
end repeat
Cheers
Dave Cragg
More information about the use-livecode
mailing list