how to add an object to a group?

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
Tomka
Posts: 59
Joined: Mon Apr 18, 2011 7:30 pm

how to add an object to a group?

Post by Tomka » Sun May 22, 2011 7:20 am

good morning,

i cant find any way to add an object to an existing group. usually, i have to ungroup, reselect all objects and make a new group. but this seems a bit complicated if there´re a couple of objects in the group.

is there a better way to add?

thanks
Thomas

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: how to add an object to a group?

Post by jacque » Sun May 22, 2011 8:17 am

You can use :

create <obj reference)> in group "groupName"

if you want a new object, or you can copy an existing one :

copy <object reference >to group "groupname
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Tomka
Posts: 59
Joined: Mon Apr 18, 2011 7:30 pm

Re: how to add an object to a group?

Post by Tomka » Sun May 22, 2011 8:21 am

great, thx.

it seems that there some issues in grouphandling. youre not able to ungroup a group or change its layer if its nested in another group. not that big problem but would be a lovely feature :D

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: how to add an object to a group?

Post by BvG » Sun May 22, 2011 11:04 am

There's also the "start editing" command for groups, which works with nested groups.

I agree that editing groups is rather inconvenient.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

cusingerBUSCw5N
Posts: 339
Joined: Wed Jul 11, 2012 9:24 pm

Re: how to add an object to a group?

Post by cusingerBUSCw5N » Tue Dec 12, 2017 5:39 pm

Hi. I want to put an image that was selected in mobilepickphoto into a group.
It started as a templateImage. I renamed it to "imageupload"
then after it uploaded:

copy image "imageUpload" to group "group_volunteer"

worked great...but now I have 2 images

I can't say delete image "imageupload" because I have 2 of them...
I can't say delete templateimage because it doesn't recognize it.
I can't say - delete image "imageupload" that isn't in group "group_volunteer"

I'm sure I'm being stupid..but how do I get rid of the first image that isn't in the group? :?:

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: how to add an object to a group?

Post by Klaus » Tue Dec 12, 2017 5:54 pm

Hi cusingerBUSCw5N,

I would:
...
copy image "imageUpload" to group "group_volunteer"
set the name of last img of grp "group_volunteer" to "imageupload2"
# or whatever

## Now you can:
delete img "imageupload"
...

Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”