Retrieve List of Array Properties?

Eric Chatonet eric.chatonet at sosmartsoftware.com
Sun Feb 19 04:13:08 EST 2006


I fully agree.
I use custom properties a lot: more than 80 in the 2.7 Rev search  
engine for instance.
Access is almost as fast as globals without requiring attention to  
possible conflicts.
If I did not share them among appropriate custom property sets, it  
would be a real mess :-)

BTW if you like array notation and consistency, you may write: "put  
the customKeys[empty] of this stack" to get the customKeys ;-)

Best Regards from Paris,
Eric Chatonet

Le 19 févr. 06 à 09:57, Dave Cragg a écrit :

> On 19 Feb 2006, at 04:05, Ken Ray wrote:
>
>> On 2/18/06 7:50 PM, "Richard Gaskin" <ambassador at fourthworld.com>  
>> wrote:
>>
>>> Scott Rossi wrote:
>>>> Recently, Dave Cragg wrote:
>>>>> One further way...
>>>>>
>>>>>  get the customKeys["specialData"] of field 1
>>>>
>>>> *THIS* is what I had in my mind of how it should work, but  
>>>> couldn't get the
>>>> syntax right.  Thanks very much Dave.
>>>
>>> Whoa.  Never seen that before.
>>>
>>> I have mixed feelings about the syntax, wondering whether ()  
>>> might be
>>> more appropriate than [] in that context.
>>>
>>> Has this been in the docs all these years and I've somehow missed  
>>> it?
>>
>> I know what you mean! It *isn't* in the docs AFAICT, so it just  
>> goes to show
>> you can certainly teach an old dog new tricks..
>
> Does that make me a spring chicken? :-)
>
> It's probably my "old doggish" behavior that accounts for me  
> knowing this. The array style runs right through all the syntax  
> relating to custom properties, and allows you to avoid specifically  
> setting a customPropertySet. Being so set in my ways before the  
> customPropertySet syntax was introduced, I've never really adapted  
> to it, and rarely think in terms of different property sets.
>
> I always think of customPropertySets as being alternative sets of  
> properties, For example, different language versions of error  
> mesages, or different settings for different platforms. In these  
> cases, it would make sense to set a customPropertySet at startup  
> and use that for the rest of the session.
>
> But I find I more often use custom properties to store structured  
> data, so have properties such as cUser["id"], cUser["name"], cUser 
> ["zodiacsign"]. In this case, I don't think of there being a  
> customPropertySet named cUser, but a single property named cUser,  
> with many attributes. Thus my preference for the array syntax.

------------------------------------------------------------------------ 
----------------------
http://www.sosmartsoftware.com/    eric.chatonet at sosmartsoftware.com/





More information about the use-livecode mailing list