Storing arrays in a custom property

Mark Smith mark at maseurope.net
Sun Feb 18 10:58:14 EST 2007


Ian, to store an array, you need to set a customPropertySet:

set the customProperties["uSolutionList"] of this stack to tSolnA

then, to access it

put the uSolutionList[key] of this stack into tVar
set the uSolutionList[key] of this stack to tVar

Best,

Mark


On 18 Feb 2007, at 15:14, Ian McKnight wrote:

> Hi
>
> I have an array ( tSolnA ) which consists of some 900+ records. Each
> record has between 2 and 14 items of comma separated data associated
> with a unique 4 digit key. As this data will not change when the stack
> is used I had thought of putting the array into a custom property (
> uSolutionList) and either
> 1) accessing individual records directly in the custom property or
> 2) populating a standard array from the custom property at startup.
>
> My problem is storing the array in the first place.
>
> When I try this
>
>  set the uSolutionList of this stack to tSolnA
>
> I get the following error
>
> Array: bad index expression
> --  
>
> and when I try this
>
> set the customproperties of this stack to tSolnA
>
> I get the array keys listed as individual custom properties and I can
> see the associated value in the properties panel but I can't seem to
> access them.
>
> --
>
> Any help would be very appreciated as I don't want to resort to
> storing the data in invisible fields!
>
> Thanks.
>
> Regards
>
> Ian
>
> =======================
> Ian McKnight
>
> iangmcknight at googlemail.com
> =======================
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list