Custom props 201 hard question
Rob Cozens
rcozens at pon.net
Mon Feb 23 12:49:22 EST 2004
>So here's me using custom props sets...
>
>on initializeXOSLanguage
> repeat for each line l in fld "randomlist"
> set the XOS[l] of this stack to random(100)
> end repeat
>end initializeXOSLanguage
>
>Results in a customproperty set named XOS with a list
>of custom properties (l) each with a random value. EZ...
>
>-- but
>
> set the custompropertyset of this stack to "XOS"
> repeat for each line l in fld "aboutlanguages"
> put helptext into aboutlanguages[l]
> end repeat
> set the aboutlanguages of this stack to helptext
>
>does nothing - creates the xos cps if not already there.
Hi Xavier,
I'm having trouble visualizing this without seeing, for example, the
content of field "aboutlanguages" and the variable helpText. As I
read the second example, you are placing the same text string
(helpText) in each element of a cps array keyed by a line of text
from field "aboutlanguages"; so if field "aboutlanguages" contained:
Français
Deutsche
español
then after the repeat you have:
aboutLanguages[Français] = helpText
aboutLanguages[Deutsche] = helpText
aboutLanguages[español] = helpText
and in the next statement you set the stack's aboutlanguages property
to helpText
Is that what you intended?
--
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list