Field of Card of Stack

Eric Chatonet eric.chatonet at sosmartsoftware.com
Sat Dec 8 10:55:41 EST 2007


Hi Shari,

Le 8 déc. 07 à 15:40, Shari a écrit :

> If you have a stack with one card, far as I can tell both of the  
> following work, but shouldn't the second one fail?
>
> get fld "Seaweed" of cd "Aquaplants" of stack "Waterbabies"

Will get the contents of the field in the specified card whatever can  
be the current card in stack "Waterbabies".
You'll use this form to get something in a card that is not currently  
displayed.

> get fld "Seaweed" of stack "Waterbabies"

Will get the contents of the field in the the current card of stack  
"Waterbabies".
This will depend on the currently displayed card.

> If no card is specified, what exactly does it do?   Is it an  
> "undocumented feature" that it catches your error in forgetting to  
> specify a card?
>
> Just something I've wondered about every time I caught a piece of  
> code where I'd forgotten to specify a card, and the code still worked.
>
> Shari

In your case, as there is only one card, both formulations will  
always work :-)
Hope this clarifies things,

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list