Creating cards

Gordon Webster gwalias-rev at yahoo.com
Sun Feb 26 14:45:01 EST 2006


It's in the stack script of the stack to which I'm trying to add the card. It's the only stack in my prototype library at the moment, but in anticipation of it being used as a library in other applications, I even had some code ahead of the "add card" line to set the defaultstack and so forth.

If I just use "create card "AnotherCard" in the message box, it works fine,but when this line is in my function, it creates the card twice. I even tried cloning the first card and the same duplication occurs with the clone command.

I'm uisng rev 2.7

Best

Gordon


jbv <jbv.silences at club-internet.fr> wrote: 

Gordon,

in which script is your addCard function located ?

> Dear Revvers
>
> Haven't used rev for a while - what am I doing wrong?
>
> 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?
>
> Best

_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list