Retrieve List of Array Properties?
Dave Cragg
dcragg at lacscentre.co.uk
Sat Feb 18 17:10:42 EST 2006
On 18 Feb 2006, at 20:07, Jeanne A. E. DeVoto wrote:
> At 11:59 AM -0800 2/18/2006, Scott Rossi wrote:
>> If I set some custom properties of an object via an array:
>>
>> set the specialData["cool"] of fld 1 to "hello"
>> set the specialData["hot"] of fld 1 to "world"
>>
>> ...how do I retrieve a list of the custom property names (are
>> these called
>> "indexes"?) of the object? ("cool", "hot", etc)
>
> There are a couple of ways. One is to use the customKeys to get the
> current set of custom properties, after first setting the current
> property set to the one you want:
>
> set the customPropertySet of field 1 to "specialData"
> put the customKeys of field 1 into myPropertyList
>
> Alternately, grab the whole array of custom properties, then get
> the array's keys:
>
> get the customProperties["specialData"] of this stack
> put the keys of it into myPropertyList
>
> The second way is probably cleaner: it doesn't change the current
> custom property set.
One further way...
get the customKeys["specialData"] of field 1
Cheers
Dave
More information about the use-livecode
mailing list