I need to loop through all the graphics on a card. Evaluating properties and customer properties and setting properties and custom properties. How do I loop through all the graphics?
Thanks,
Processing all the graphics on a card
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Processing all the graphics on a card
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013
-
- VIP Livecode Opensource Backer
- Posts: 10049
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Objects can be referred to by their ordinal number (e.g., "control 1" for any object on the card, or "graphic 1" for just objects of that type).
The "repeat" control structure has a form which lets you increment a counter variable (e.g., "repeat with i = 1 to 10").
The number of objects of a given type can be determined by simply asking:
"get the number of graphics".
So putting these ingredients together we get this recipe:
The "repeat" control structure has a form which lets you increment a counter variable (e.g., "repeat with i = 1 to 10").
The number of objects of a given type can be determined by simply asking:
"get the number of graphics".
So putting these ingredients together we get this recipe:
Code: Select all
repeat with i = 1 to the number of grcs
put the customProperties of grc i into tMyPropsArray
-- do something with those
end repeat
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn