Grouping controls within a group

Peter Haworth pete at lcsql.com
Thu Feb 27 11:59:04 EST 2014


Thanks Bjornke.

I'm nervous about putting a group into and out of edit mode by script
having had some bad experiences with it in the past. Seems like it puts the
stack into a weird and wonderful state where the controls outside of the
edited group no longer exist and any reference to a control that includes
the group name fails. Any script runtime errors stand a chance of
corrupting the stack.

However, your suggestion to lock the screen sounds like it would take care
of my concerns and I'd only be in group edit mode for a few milliseconds so
I'll give this a whirl.  It is less code than the other solutions and I
like that.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>


On Thu, Feb 27, 2014 at 6:06 AM, Björnke von Gierke <bvg at mac.com> wrote:

> You can also use the "start / stop editing" command while locking the
> screen. Basic testing shows it that just messing with
> relayerGroupedControls doesn't help... Could be nice if that'd be possible.
> Until then, the following works:
>
> on mouseUp
>    lock screen
>    start editing group 1
>    group button 1 and button 2
>    stop editing
> end mouseUp
>
> On 27.02.2014, at 00:58, Peter Haworth <pete at lcsql.com> wrote:
>
> > I have a need to group controls within an existing group into a subgroup
> by
> > script, but I get a runtime error when trying to do that - in 6.5.2 the
> > message is "Object cannot be grouped".
> >
> > Any ideas on how to do that?  The only way I can think of is to ungroup
> the
> > main group, group the selected controls to form the subgroup, then group
> > the subgroup and the rest of the controls to reinstate the main group,
> but
> > that's pretty scary!
> >
> >
> > Pete
> > lcSQL Software <http://www.lcsql.com>
> > Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> > SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> --
>
> Use an alternative Dictionary viewer:
> http://bjoernke.com/bvgdocu/
>
> Chat with other RunRev developers:
> http://bjoernke.com/chatrev/
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list