On Mon, 27 Dec 1999, Rob Pitt wrote:
>
> I index my complete project every 12 months and am attempting to create the
> 99 index over Xmas. Under 2.2, I indexed every word using custom properites
> using script as follows where cd 1 of stack "AIndex" holds fields named for
> every card in the project:
>
> on ihavefoundthewordandwillmakeitanelementinthearray
> global gwordToIndex, gcardName
> if the first char of gwordToIndex is "a" then
> set the myindex [gwordToIndex] of card fld gcardName of cd 1 of stack
> "AIndex" to gcardName
> exit ihavefoundthewordandwillmakeitanelementinthearray
> end if
> if the first char of gwordToIndex is "b" then
> etc etc etc
>
> Under 2.3 "set the myindex [gwordToIndex] of card fld gcardTopic of cd 1 of
> stack "AIndex" to gcardTopic" doesnt work at all. The readMe refers to
> customProperty sets in 2.3 but I can't work out the syntax to duplicate
> what I was doing in 2.2.
>
> Can anyone provide the correct syntax to use in 2.3?
The syntax is the same. What's changed is that in 2.3 if you try to
use a custom property that has the same name as one of your variables,
it will use the *contents* of that variable as the custom property
name, not the name of the variable. I can't tell if this is the
problem from the scripts above, but you should make sure that you
don't have a variable named "myindex", which would trigger this new
behavior.
Regards,
Scott
PS: as for customPropertySets, there is one case where you need to
know about them when using custom properties as arrays. That's when
you need to get a list of all the keys set in an array. In 2.3 you
need to pass the array name as an argument with the customKeys
property. In your case it would be something like:
get the customKeys["myIndex"] of card x
> Rob Pitt
>
>
>
>
> This is the MetaCard mailing list.
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
>
********************************************************
Scott Raney [EMAIL PROTECTED] http://www.metacard.com
MetaCard: You know, there's an easier way to do that...
This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm