Why I love LiveCode

J. Landman Gay jacque at hyperactivesw.com
Fri Nov 22 13:26:47 EST 2013


On 11/22/13 12:18 PM, Devin Asay wrote:
> I have been using LC/Rev since v. 1.0 beta, and HyperCard for 10 years before that, and I never knew you could do this. It's probably LC 101 to most of you, but for some reason I had never needed to do this.
>
> I was in a substack and needed to know which card was currently showing in the mainstack.
>
> So I tried:
>
>    put this card of stack "foo" -- the mainstack --> error, not a container.
>
> So then I tried
>
>    put the name of this card of stack "foo" --> works!
>
> It's even more readable like this
>
>    put the name of the current card of stack "foo" -- 'current' is a synonym of 'this'
>
> I love "guessable" syntax!

There's also the "currentCard" property: put the currentCard of stack 
"foo". I still haven't quite figured out how it differs from "this card" 
though, except that you don't need to specify "short name". CurrentCard 
was added a few versions ago.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list