array info request (new thread)

Lynch, Jonathan bnz2 at cdc.gov
Mon Jul 25 14:50:14 EDT 2005


I have never had a problem with multiple item arrays: myArray[1,2,3]

However, I did have a problem with a custom property set named
"Scheduled Items" - but the problem cleared up when I named it
"ScheduledItems" - I cannot remember what exactly the problem was, but I
do remember that it was not real obvious.

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Dennis
Brown
Sent: Monday, July 25, 2005 2:43 PM
To: How to use Revolution
Subject: Re: array info request (new thread)

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


_______________________________________________
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