Setting a element of a array equal to a array?

Trevor DeVore lists at mangomultimedia.com
Mon Feb 9 15:31:35 EST 2004


On Feb 9, 2004, at 1:18 PM, "" <nnoydb at excite.com> wrote:
>
> Simple syntax/support question I would like to "put" a array into the 
> element of another array then access it.  How would this be done?
>
> put myArray into otherArray[ARRAY_KEY]
>
> If so can t be accessed via
>
> put otherArray[ARRAY_KEY][0] into myVariable?

In Transcript a multi-dimensional array is created like this - 
myArray["key1", "key2"].  AFAIK you cannot assign an array as the value 
of another array element.  Someone correct me if I'm wrong.

What you can do is assign an array to a custom property set.  An 
example:

put "stuff" into myArray["Key1", "Key1.2", "Key1.2.1"]

set the customProperties["MyArray"] of this card to myArray

The card would now have a new Custom Property named "MyArray" with the 
key: "Key1,Key1.2,Key1.2.1" and a value of "stuff"


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list