Page 1 of 1

How can I build a container ? [Solved]

Posted: Mon May 12, 2014 3:43 pm
by atout66
Hi to all,

Is there a way in LC to build a container so I don't have to write a long piece of words all the time ?
The code below is NOT OK while compiling in the editor code

Code: Select all

put card "myCard" of stack "myStack" into laCard
The var <laCard> is supposed to let me reference a field "myField" just like that:

Code: Select all

get fld "myField" of laCard
Instead of :

Code: Select all

get fld "myField" of card "myCard" of stack "myStack" -- which is correct but too long to write
Any idea around ?
Thanks in advance, Jean-Paul.

Re: How can I build a container ?

Posted: Mon May 12, 2014 4:04 pm
by Klaus
Bonjour jean-Pau,

you can use "the long ID of ..."!
...
put the long ID of card "myCard" of stack "myStack" into laCard

## If you'd like to see what that gives :D
## answer laCard
...

Then access its content like you already wrote:
...
put fld "myField" of laCard into tVariable
...

Best

Klaus

Re: How can I build a container ?

Posted: Mon May 12, 2014 5:01 pm
by atout66
Klaus, your post number 5900 is "excellent". :wink:
Didn't know this feature <long ID>...

Thanks for your help, Jean-Paul.