How to add a group to another group in code

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

How to add a group to another group in code

Post by dave_probertGA6e24 » Sat Jan 14, 2012 7:49 pm

Hi,

I've created a clone of a group (A) at runtime and would like to add it to another group (B) via code.

I cannot see a way of setting the owner (read-only property) or the parent or whatever of (A) to the existing (B) group.

Is there a way of doing this?

Thanks.
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: How to add a group to another group in code

Post by sturgis » Sat Jan 14, 2012 8:25 pm

try "copy group "yourgroup" to group "destinationgroup"

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: How to add a group to another group in code

Post by dave_probertGA6e24 » Sat Jan 14, 2012 11:14 pm

Hi Sturgis,

Thanks for that - much better than cloning and trying to move it :) Simply copy directly to the group - perfect(ish!)

Now on to the next fun bit :)
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

Post Reply