[SOLVED] Groups disappear from card

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
redfield
Posts: 95
Joined: Thu Apr 04, 2019 1:41 pm

[SOLVED] Groups disappear from card

Post by redfield » Wed Nov 13, 2019 8:44 pm

Hi guys,
I need help again, really don't get what's going on here.
When grouping some objects on a card, they simply disappear from the card. I can only "see" them in the Project Browser. The layer of the card itself is 3 and for some reason I can't change it to 4 or higher. The layers of one of the vanished groups and the two objects it contains (label and field) are 5, 6 and 7. The objects are all set to visible. One of the groups does not disappear but I can't spot any significant difference between this one and all the disappeared ones :? .
Last edited by redfield on Mon Nov 25, 2019 7:44 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Groups disappear from card

Post by richmond62 » Wed Nov 13, 2019 8:58 pm

I have had a similar experience and it took me a longish time to find out why
and made me feel pretty foolish at the time.

Probably the best way to explain this is with a practical demonstration of how to get in the mess in the first place.

1. Open a new stack.

2. Put a button in the centre of the new stack.

3. Group the button (I know a group consisting of one object is daft; but it has its uses).

4. Click the browse 'thing' on the revTools palette.

5. Click the pointer 'thing' and then select your button.

6. Delete the button.

7. NOW: because you deleted the button from inside the group, but did not delete the group
it will now play "merry hell" as every time you now attempt to group something it will end up in that
non-deleted group.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10320
Joined: Wed May 06, 2009 2:28 pm

Re: Groups disappear from card

Post by dunbarx » Wed Nov 13, 2019 10:18 pm

It takes a bit of getting used to, that you can empty a group without deleting that group. In other words, a group is an object in and of itself, and does not really care whether it contains other controls. Sometimes they are pesky, lingering long after you thought they were dismissed.
Group the button (I know a group consisting of one object is daft; but it has its uses).
A group consisting of a single control may very well be useful. One may want to automatically "clone" a field onto new cards as they are created. For that, you group a field and set its background behavior. You then may or may not set its shared behavior.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Groups disappear from card

Post by FourthWorld » Wed Nov 13, 2019 10:21 pm

@Richmond, Craig: The OP says he has controls in one of the "vanished" groups.

@redfield: Could you please post a screen shot of your Project Browser so we can better understand what you're seeing?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

redfield
Posts: 95
Joined: Thu Apr 04, 2019 1:41 pm

Re: Groups disappear from card

Post by redfield » Wed Nov 13, 2019 10:54 pm

Hi guys,
thanks so far. So I am attaching a screenshot of the PB, although I had already tidied up the mess in it - I don't think it's very meaningful this way, is it?

sample.png

Probably I should start all over again and be very careful with deleting objects or groups :roll: .

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Groups disappear from card

Post by FourthWorld » Wed Nov 13, 2019 11:10 pm

Quite helpful, thank you.

In the IDE's Objects menu, are any of the non-visible groups listed in the "Place Groups" submenu?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Groups disappear from card

Post by richmond62 » Thu Nov 14, 2019 8:11 am

@Richmond, Craig: The OP says he has controls in one of the "vanished" groups.
Lovingly created for you here.
-
AG1.png
This Group (group "GROOP") contains 2 buttons which you cannot see because
they are located outwith the bounds of the group.
-
AG2.png
Here are the members of the group "GROOP"
-
How did "our resident genius" do that marvellous thing, we ask ourselves?

I created 2 fields where group "GROOP" is, grouped them, named the resultant group "GROOP",
then de-grouped them again, deleted them (the fields, and then grouped the 2 buttons. 8)
Attachments
Annoying Groups.livecode.zip
Here's the stack
(868 Bytes) Downloaded 298 times
Last edited by richmond62 on Thu Nov 14, 2019 8:19 am, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Groups disappear from card

Post by richmond62 » Thu Nov 14, 2019 8:18 am

And, what is the lesson (which I am repeatedly forgetting) of this "little problem" ?

Make 100% sure you DELETE a GROUP as well as its constituents!
-
badBoy.png

redfield
Posts: 95
Joined: Thu Apr 04, 2019 1:41 pm

Re: Groups disappear from card

Post by redfield » Mon Nov 25, 2019 7:43 pm

I will definitely make sure in the future. Finally I got back to this today and would like to share how I managed to make the groups visible again.

In the Project Browser: first I unlocked the location of the group (right-click on the group, untick Lock Location) and then I set the visibility of one of the group members to false (click on the eye symbol), then back to true and voila, all group members "appeared".

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10320
Joined: Wed May 06, 2009 2:28 pm

Re: [SOLVED] Groups disappear from card

Post by dunbarx » Mon Nov 25, 2019 8:56 pm

That is what made it go away? setting and resetting the visible of a child of the group? Can you duplicate this? The team would be interested, I think.

Craig

redfield
Posts: 95
Joined: Thu Apr 04, 2019 1:41 pm

Re: [SOLVED] Groups disappear from card

Post by redfield » Sun Dec 01, 2019 8:22 pm

I am attaching the messy Stack. When for example Group A und B (the first two) are ungrouped, then the group members of Group B seem to get kicked out of their Group, by the group members of Group A.

In the Stack, Group A and its members are now invisible. In the Project Browser Group A is gone, its members are now in Group B and the members of Group B are outside of any group.

In the Project Browser now I right-click on Group B and untick 'Lock Location'. Then I set the visible of a group member (in this case lA) to false, and then to true and the Group is visible again in the Stack. :?
Attachments
groups.livecode.zip
(2.82 KiB) Downloaded 294 times

Post Reply