Working with a 'group'

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Tom
Posts: 11
Joined: Wed Feb 13, 2008 10:25 pm

Working with a 'group'

Post by Tom » Fri Mar 14, 2008 1:54 am

How do I add a new object to an EXISTING group (and therefore still keep the script that went with the existing group)?

Tom

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Fri Mar 14, 2008 2:39 am

Do you want to dynamically create an object by script or use the toolbar?

If the former:

create button "myButton" in group "myGroup"

if the latter:

make sure select grouped is active, select the group, click edit group

Hope that helps,

Malte

Tom
Posts: 11
Joined: Wed Feb 13, 2008 10:25 pm

Post by Tom » Fri Mar 14, 2008 2:56 am

I want to use the toolbar...

Malte, still confused.

Let's say I have 3 buttons, A, B and C, all located in group 1024.
I decide I want to add button D to group 1024.

You said to select the group (by clicking on one of the 3 buttons), then select 'edit group'. That enables me to edit any member of the group. But I still don't know how to add, in this example, button D to the group without create a new group. (When I create a new group, it becomes a subgroup of 1024)

The workaround is to copy the script from group 1024, ungroup it, select all the objects that I want in the new group (A, B, C, AND D in this example), create a new group and then paste the script into the new group... it's a workaround, but klugey.

Tom

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Fri Mar 14, 2008 7:28 am

while you are in group edit mode, simply drag another button over from the toolbar.

Hth,


Malte

bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Adding to a group...

Post by bjb007 » Sat Mar 15, 2008 1:46 am

But if it's an existing button?

I asked the same question under
"Adding to a Group" subject below.
Life is just a bowl of cherries.

mcgrath3
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 149
Joined: Thu Feb 23, 2006 8:49 pm
Contact:

Post by mcgrath3 » Sat Mar 15, 2008 5:45 am

copy [object [to {card | group | stack} ]]

copy button "Existing Button" to group "Group Name Here"

delete button "Existing Button"
Tom McGrath III
Lazy River Software
3mcgrath@comcast.net

Post Reply