Grouping Controls in selectGroupedControls mode

Mark Waddingham mark at livecode.com
Fri Oct 6 08:35:54 EDT 2017


Hi all,

I just wondered if anyone had any thoughts on this report:

   http://quality.livecode.com/show_bug.cgi?id=20511

The summary of the report is that when a 'group' operation fails you 
only get a 'beep' and no indication as to why the failure occurred.

Group operations will fail if the owner of all controls being grouped is 
not the same - I think this is a reasonable restriction, as otherwise it 
would be very easy to break things by accidentally grouping controls you 
did not intend. Obviously, the obvious 'fix' is to make it so that the 
'Group' operation in the IDE is disabled if the owner-rule is violated.

However, whilst perhaps clearer in the sense you would know ahead of 
time whether you can group, it still does not help you work out *why* 
you cannot group. One thought I had here was whether a visual indication 
of the ownership of selected controls in 'selectGroupedControls' mode 
might help - basically perhaps painting a subtle border around the 
owning groups of each selected object.

Of course, this might just be highlighting the fact that 
'selectGroupedControls' mode in LiveCode is perhaps somewhat 
'non-standard'. For example Pages (which just happened to be a 
convenient app I have installed which does grouping and such) works 
quite differently:

   Clicking on a grouped object selects the group.

   Double-clicking on a object within the selected group will select the 
object, or the next nested group if the object is within the group.

   You can only select object / groups together which have the same 
owner.

   You can select a nested object directly by doing an 'n-click' - where 
n is the nesting of the group

   When a nested object is selected, its immediate owning group has a 
border around it (grey, rather than the blue of the selected border).

   When you create an object it is created in the currently selected 
group of the group which directly contains the selected object.

Of course, the last rule here exposes a distinct difference in the way 
things are created in Pages compared to LiveCode - in LiveCode, the 
'object tools' allow you to click-drag-create; whereas in Pages it is 
click to create at standard size and then edit.

So, anyway, perhaps just making the 'Group' operation enabled/disabled 
based on selected objects is the most reasonable thing to do now.

However, it would be nice to imagine how selectGroupedControls could 
actually be eliminated - as it (together with 'Edit Group mode') are, 
well, just plain odd when viewed from the eyes of someone coming from 
other tools which have the concept of object and group.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list