Grouping cloned objects

J. Landman Gay jacque at hyperactivesw.com
Tue Apr 6 01:03:09 EDT 2010


Jeffrey Massung wrote:
> Sorry if this is in the documentation and I just haven't seen it,
> but...
> 
> I have a group of objects that - at runtime, I'll be cloning. Simple
> enough, but when I clone it, I'd also like to add some objects to the
> group, but I haven't found any simple way of adding objects to an
> already existing group via code at runtime.
> 
> Is there a simple way of doing this other than getting all the
> controls in the group, selecting them (and the new objects) and
> regrouping the controls?

If it's an existing object:

   copy <obj> to grp <group specifier>

   i.e.: copy btn "example" to grp 1

If you need a new control:

   create <obj> in group <group specifier>

   i.e.: create btn "example" in grp "clonedGroup"


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list