Group functions

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Location: Virginia, USA
Contact:

Group functions

Post by trenatos » Sun Jul 07, 2013 9:59 am

I'd like to see more group features, such as a simple "Add Object to Group" "Remove Object from Group" and a setting for automatically creating a group with items when using a tab panel.
Marcus

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2820
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Group functions

Post by mwieder » Mon Jul 08, 2013 8:49 pm

Not sure what you're asking here. Do you mean from the IDE's menu from a script?
Granted, your first group items (adding and removing objects from a group) is awkward right now. I always end up copying an object into a group and then deleting the original.

The other way to do this (no less awkward) is:
1. select the object to move into the group
2. cut the object
3. select "edit group" from the object menu
4. paste the object
5. select "stop editing group" from the object menu

or
1. select "edit group" from the object menu
2. cut the objects you want removed
3. select "stop editing group" from the object menu


Re #2: command- or control-click to select several objects, then select "Group Selected" from the Object menu.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Group functions

Post by shaosean » Mon Jul 08, 2013 9:04 pm

You can write a plugin to add the features using the relayerGroupedControls property..
You can move a control out of a group by setting the control's layer to a number greater than the topmost control in the group, or less than the bottom-most control in the group.
You can move a control into a group by setting the control's layer to a number between the bottom-most and topmost controls in the group.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2364
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Group functions

Post by jmburnod » Mon Jul 08, 2013 10:17 pm

Hi,

You can also do it by script

Code: Select all

   copy control "MyControl"  to group "MyGroup"
Best
Jean-Marc

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2820
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Group functions

Post by mwieder » Mon Jul 08, 2013 10:31 pm

@Jean-Marc-

But that leaves the original in place as well. Wouldn't it be nice to have

Code: Select all

       move control "MyControl"  into group "MyGroup"

trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Location: Virginia, USA
Contact:

Re: Group functions

Post by trenatos » Mon Jul 08, 2013 11:23 pm

Right, and all of these are workarounds for something that's so simple and common it should be in there already.

Working with multiple groups, I'd like to be able to:

Click the group, shift-click an object and click on Group to have the object added to the existing group.

Click the group, and automatically add new (Drag/Dropped) items to the highlighted group

When using a tab-panel, have a setting to automatically create groups for each tab.

This IS the feature request area, I'm not really looking for workarounds, I'm suggesting this be added to the otherwise pretty nice IDE.
Marcus

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2820
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Group functions

Post by mwieder » Tue Jul 09, 2013 12:19 am

...and I, for one, think it's an excellent suggestion. Working with groups is awkward and error-prone right now. The new project browser, or whatever it's called, makes things a bit easier. Pete Howarth has his lcStackBrowser http://www.lcsql.com/lcstackbrowser.html that makes it easier still. And I think Chipp Walters has a groups plugin as well. But this process should really be easier in the IDE.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2364
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Group functions

Post by jmburnod » Tue Jul 09, 2013 8:54 am

Hi Mark,
I tried

Code: Select all

move control "MyControl"  into group "MyGroup"
doesn't work for me:

Script compile error:
Error description: move: missing 'to'

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

Re: Group functions

Post by Klaus » Tue Jul 09, 2013 12:03 pm

Jean-Marc,

read the complete postings ;-)

Mark wrote in subjunctive:
### Wouldn't it be nice to have "move control..."
:-)


Best

Klaus

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Group functions

Post by shaosean » Tue Jul 09, 2013 10:37 pm

While it would be nice to have the controls automatically go in to the group, it is one of the more annoying features I have found with RealStudio (Xojo) as you cannot overlap controls without them all becoming part of the same group and when you toggle the visibility of the containing control the whole group changes visibility..

trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Location: Virginia, USA
Contact:

Re: Group functions

Post by trenatos » Tue Jul 09, 2013 11:45 pm

Simple settings or hot-buttons (When dragging/dropping) would solve those issues.

Really, this is something simple to implement that would really speed things up when working with groups and objects, especially if you're working with the tab-panels.
Marcus

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Group functions

Post by shaosean » Wed Jul 10, 2013 7:52 am

Well, the tab panel is not a true container so you would need to create groups to be used, but it really shouldn't be that hard to write something to do it.

trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Location: Virginia, USA
Contact:

Re: Group functions

Post by trenatos » Thu Jul 11, 2013 12:30 am

That's exactly my point.

But even though there's an Open Source version of LC, I won't be writing it, I'm hoping RunRev will, simply because they have a commercial edition, which I assume uses the same codebase as the community edition.
Marcus

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Group functions

Post by shaosean » Thu Jul 11, 2013 5:36 am

I doubt they will..

All you would really need to do is write a front script to monitor the creation/editing/deletion of a tab control and then rect of the controls being dragged around to move them in and out of the "tab container"

trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Location: Virginia, USA
Contact:

Re: Group functions

Post by trenatos » Thu Jul 11, 2013 8:36 am

I know it'd be easy to write, but my point is that they're selling commercial licenses based on I assume, the same codebase as the community edition, then it's only logical that they implement changes.
Marcus

Post Reply

Return to “Feature Requests”