Groups and cloning

Jerry Balzano gjbalzano at
Wed Feb 2 20:06:01 EST 2005

Hi all,

I'm learning about the wonderful world of groups. I know about the 
"owner", but is there an easy way to get the "owned"?  Right now, the 
only way I have figured out to "get at" the members of a group is to 
use a repeat loop, as in

	repeat with i=1 to the number of controls of group X
		do something with control i of group X
	end repeat

More to the meat of my problem, suppose one wanted to create a 'clone' 
of one of these group members.  Some simple mouse interaction like 
clicking on a group member would create a copy of the control, stuck to 
the mouse until the user clicked somewhere to "drop" it.  Mouse stuff 
aside, "clone" all by itself doesn't do what I want, because it 
creates, not a new ungrouped control that looks like the clicked-on 
control, but another group member.  This makes sense, I suppose, since 
you are "cloning" all of the properties of the control, including its 
owner.  So how does one do what I want?  Does one have to ungroup and 
regroup?  The "owner" property is not directly settable (right?), or 
I'd just set the owner of the new 'cloned' control to the card (instead 
of the group).  Seems like this should be simpler than I'm making it 

Thanks for any enlightenment from the group on this,
Jerry Balzano

More information about the Use-livecode mailing list