Ungroup a nested group

Peter Haworth pete at lcsql.com
Mon Mar 25 11:21:37 CDT 2013


Hi Geoff,
In my lcSTackBrowser utility  I want to provide the ability to delete a
nested group.  Someone just sent me a solution using relayergroupedcontrols
which feels much safer than the method I mentioned.
Pete
lcSQL Software <http://www.lcsql.com>


On Mon, Mar 25, 2013 at 7:53 AM, Geoff Canyon <gcanyon at gmail.com> wrote:

> What are you trying to accomplish? I've always used layers to move things
> into and out of groups.
>
> gc
>
>
> On Sun, Mar 24, 2013 at 5:47 PM, Peter Haworth <pete at lcsql.com> wrote:
>
> > What seems to work in a script is to start editing each owning group
> until
> > you reach the one containing the group to be ungrouped, ungroup it, then
> > stop editing its owning group.
> >
> > I'm nervous though.  I've found that the world of editbackground mode is
> a
> > weird and wonderful place.  No matter how many cards are in the stack
> being
> > edited, the cardIDs returns only the card that is being edited.  And the
> > number of controls on the card is the number in the group being edited
> not
> > the number on the card.  And the long id of any control in the group
> before
> > you entered this strange place isn't valid because it's not a member of
> the
> > group at that point.
> >
> > Pete
> > lcSQL Software <http://www.lcsql.com>
> >
> >
> > On Sun, Mar 24, 2013 at 1:26 PM, Peter Haworth <pete at lcsql.com> wrote:
> >
> > > Unless I'm missing something, it looks like the ungroup command doesn't
> > > work on nested group, i.e. one that is owned by another group.  The
> > ungroup
> > > command doesn't return an error either.
> > >
> > > It feels like the only way to do this is to ungroup all the owning
> groups
> > > first but that seems fraught with dangers of losing the group
> structures.
> > >  Is there a better way to do it.  By Script I mean.
> > >
> > > Thanks,
> > >
> > > Pete
> > > lcSQL Software <http://www.lcsql.com>
> > >
> > _______________________________________________
> > 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-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