Getting to Grips with Groups

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
RossG
Posts: 247
Joined: Thu Jan 08, 2015 7:38 am

Getting to Grips with Groups

Post by RossG » Wed May 11, 2016 8:17 pm

I have a repeat loop to clone a field and want to
group them.

Is there a way to "add to group xxx" or something similar?

If there is it could be put into the loop as they're created.
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Getting to Grips with Groups

Post by dunbarx » Wed May 11, 2016 8:57 pm

Hi.

You likely want to look at the "copy" command, especially with its "into group" variant. You may also want to look at the "last" keyword, in case your loop does not handle this action explicitly.

Craig Newman

RossG
Posts: 247
Joined: Thu Jan 08, 2015 7:38 am

Re: Getting to Grips with Groups

Post by RossG » Wed May 11, 2016 10:49 pm

I don't think that the copy command allows for re-naming.

The "selectedObject" function looks interesting as it produces
a list which seems to be a requirement for grouping.

What do you think?
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Getting to Grips with Groups

Post by FourthWorld » Wed May 11, 2016 11:24 pm

If you keep one field in the group the clone command will clone within the group.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Getting to Grips with Groups

Post by dunbarx » Thu May 12, 2016 1:23 am

I do not understand.

You can create a single control, however you do it, and group it. You can then copy any other control into that group.

Cloning a control from a group member will place that new control in that group.

The options are wide open. What is it you need to do?

Craig

RossG
Posts: 247
Joined: Thu Jan 08, 2015 7:38 am

Re: Getting to Grips with Groups

Post by RossG » Thu May 12, 2016 3:26 am

Craig

What I want to do is exactly as you describe.

So much to learn, so little time.
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.

Post Reply