array info request (new thread)

Dennis Brown see3d at writeme.com
Mon Jul 25 14:43:11 EDT 2005


Jonathan,

This is interesting about the 1-word names.  I have been using  
multiword names without any problems.

Do you recall exactly what the problem was?
Was it that the array did not work as advertized, or that you had  
problems with sorting keys or making the key unique?

Of course multi-item names are the normal state for a key name so  
even if my preferred simplicity of array[key1&&key2]  for custom  
property set arrays has a problem, array[key1&comma&key2] has got to  
work.

Dennis

On Jul 25, 2005, at 1:40 PM, Lynch, Jonathan wrote:
> Custom properties and custom property sets should have 1-word names.
>
> Somewhere in the docs it says otherwise, but having a space in the  
> name
> of a custom property caused me trouble at one point, which was fixed
> when I made sure it just had a single-word name.
>
>
> Another one that comes to mind is the repeat for each element control
> structure...
>
> The internal order in which keys are stored in a custom prop is not
> sorted alphabetically - so, if you need to search in order, you  
> might be
> better off doing something like this:
>
> Set the custompropertyset of me to "scheduledItems"
> Put the customkeys of me into tKeys
> Sort tKeys
> Repeat for each line L in tKeys
>   If the scheduleditems[L] of me contains "my search string" then
>     Do whatever it needs to do
>   End if
> End repeat





More information about the use-livecode mailing list