Variable holding a chunk
Jim Ault
JimAultWins at yahoo.com
Fri Jan 5 16:44:50 EST 2007
On 1/5/07 1:06 PM, "Jim Carwardine" <JimCarwardine at OwnYourFuture-net.com>
wrote:
> Hi List...
>
> I always seem to draw a blank when I try to debug this structure. It
> doesn't matter how many times I do it I always seem to run into this wall.
>
> I have a variable, myVar, that holds a chunk, [line 2 of field "myField" of
> group "myGroup" of card id 1002 of stack "myStack"].
>
> When I say [put myVar into field "xxx"] I get the chunk expression not the
> data held by the field represented by the chunk expression.
>
> When I try and review the Users Guide to refresh my mind about how to do
> this, I can never remember how it is described in the Users Guide.
>
> What are the magic words to find how to do this in the Users Guide? Jim
I guess one way to think about this is not a "magic word" but a "magic
concept"
As you have stated....
myVar = line 2 of field "myField" of group "myGroup" of card id 1002 of
stack "myStack"
thus ...
word 1 of myVar = "line"
word 3 to 5 of myVar = of field "myField"
the last word of myVar = "myStack"
so myVar holds the *description* of a container
You need to utilize the description (which is a string), such as
put "put 1 into "& myVar into aCommandLineToRun
do aCommandLineToRun
or
do ("put 1 into "& myVar )
or
put merge("put 1 into [[ myVar]]") into msg
or
do merge(" put 1 into [[ myVar]]")
Hope this gets you closer
Jim Ault
Las Vegas
More information about the use-livecode
mailing list