Save array

Richard Gaskin ambassador at
Tue Nov 5 03:56:01 EST 2002

paolo mazza wrote:

> How can I save an array into a stack?
> I thought I could save the array into a custom property.
> Am I supposed to combine the array and save in text format?

You can do that, or you can set an entire propertyset to an array, with each
element in the array becoming a property in the specified propertyset:

  -- Create an array:
  put "hello world" into tMyArray[1]
  -- Tell MC which propertyset to work with:
  set the propertyset of stack "storage" to "ArrayData"
  -- Set all of the key-value pairs of the storage object to
  -- the key-value pairs of the array:
  set the properties of stack "storage" to tArrayData

 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.0: Publish any database on any site
 Ambassador at
 Tel: 323-225-3717                       AIM: FourthWorldInc

More information about the Use-livecode mailing list