Hi Graham,

Am 20.06.2013 um 13:04 schrieb Graham Samuel <[email protected]>:

> I have a kind of drawing space on a card where a user can create graphics. I 
> also have a group showing on this card, which is in fact a group of mixed 
> controls, including both graphics and fields,. I have a button that deletes 
> all the graphics on the card by simply doing a loop from 1 to the number of 
> grcs on the card and deleting each grc as it passes through. My group (which 
> I don't want to delete) clearly is not itself a graphic: nevertheless my 
> button deletes all the graphics in the group, from which it appears that each 
> graphic can be accessed separately even when it' s grouped.
> 
> I thought that by setting the selectGroupedControls to false, I would protect 
> the graphics inside the group from being selected. Not apparently if the 
> selection is done by script. I also tried setting the cantDelete of the group 
> to true, and that didn't seem to work either: elements of the group can still 
> be deleted.
> 
> Luckily in this specific case there is only the one group on the card, so I 
> can tell my loop not to delete those graphics that have the word "group" in 
> their long ID, and this works.
> 
> This seems incredibly clunky: is there another way to distinguish between 
> graphics (or in principle, other objects) within a group and graphics outside?

you can check "the owner of grc xyz" or "the short name of the owner of grc 
xyz" in the repeat loop.

This will be :
1. INSIDE -> the name of the group -> group "name of group"
2. OUSIDE -> the name of the the card -> card "name of card"

> TIA
> 
> Graham

Best

Klaus

--
Klaus Major
http://www.major-k.de
[email protected]


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to