Arrays
Mark Smith
mark at maseurope.net
Fri Feb 4 08:59:34 EST 2005
On 4 Feb 2005, at 04:59, use-revolution-request at lists.runrev.com wrote:
> on saveArray
>
> global gBigArray
>
> -- target a specific custom property set
> set the customPropertySet of stack "allMyArrays" to "uBigArray"
>
> -- replace all elements of 'uBigArray' CPS with 'gBigArray'
> set the customProperties of stack "allMyArrays" to gBigArray
>
> -- save it
> save stack "allMyArrays"
>
> end saveArray
In fact, it isn't necessary to set the the customPropertySet if you
don't need to access elements of it directly. If you simply want to
store an array you can do this:
on saveArray tMyArray
set the customProperties["storedArray1"] of this stack to tMyArray
end saveArray
to retrieve:
function getArray
put the customProperties["storedArray1"] of this stack into tMyArray
return tMyArray
end getArray
you can store as many arrays as you like this way, as
customPropertySets are creatable and accessible using the above array
notation.
--
cheers,
Mark
More information about the use-livecode
mailing list