Field of Card of Stack
Jim Ault
JimAultWins at yahoo.com
Sat Dec 8 11:14:04 EST 2007
On 12/8/07 6:40 AM, "Shari" <shari at gypsyware.com> wrote:
> Nothing earthshattering, just something I've wondered about.
>
> 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"
> get fld "Seaweed" of stack "Waterbabies"
>
> 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.
get fld "Seaweed" of cd "Aquaplants" of stack "Waterbabies"
get fld "Seaweed" of stack "Waterbabies" --curr card
get fld "Seaweed" --curr card of curr stack
get the cpSpecies of this stack
--assumes current property set
get the plantData[cpSpecies] of this stack
-- specifies which property set
get the cpSpecies of button "Water Lilly" of card "Tasmania" of stack
"Australian Locales"
--assumes the current property set of button "Water Lilly"
get the plantData[cpSpecies] of button "Water Lilly" of card "Tasmania" of
stack "Australian Locales"
-- specifies which property set at the exact data storage location
get the foodData[cpNutrients] of button "Water Lilly" of card "Tasmania" of
stack "Australian Locales"
-- specifies which property set at the exact data storage location
Hope this helps
Jim Ault
Las Vegas
More information about the use-livecode
mailing list