Creating cards

Sarah Reichelt sarah.reichelt at gmail.com
Tue Feb 28 21:19:19 EST 2006


> I created a function to add a named card to a stack like this:
>
> function addCard cardname
>   create card cardname
> end addCard
>
> When I run it from the message box like this: addCard("AnotherCard"), it creates the new card twice!
>
> Before I run this function, the 'cardnames' of my stack looks like this:
>
> MyFirstCard
>
> Afterwards, it looks like this:
>
> MyFirstCard
> AnotherCard
> AnotherCard
>
> Any ideas why it creates the new card twice?

Are you using Constellation? I had a feeling one time that it was
doing things twice if I called a function from it's message box, but
when I checked, I decided I must have been imagining things :-)

To test, make a button and use it to call your function.

Sarah



More information about the use-livecode mailing list