Still a beginner who doesn't know how to make a group.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Still a beginner who doesn't know how to make a group.
All resolved now, many thanks to all mentors and clairvoyants !
Casba
and.. er.. Susan
Casba
and.. er.. Susan
-
- VIP Livecode Opensource Backer
- Posts: 9385
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
CAsba.
What I want to make sure of is that you see a group is just another type of control, like a button or field. The fact that a group can contain other controls makes it a bit special, but otherwise no different than any other control. So simply naming it should not ever have been an issue here.
Craig
What I want to make sure of is that you see a group is just another type of control, like a button or field. The fact that a group can contain other controls makes it a bit special, but otherwise no different than any other control. So simply naming it should not ever have been an issue here.
Craig
-
- Livecode Opensource Backer
- Posts: 9059
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Still a beginner who doesn't know how to make a group.
"Big fleas have little fleas upon their backs to bite them, and little fleas have lesser fleas, and so ad infinitum."
1733 Swift
1733 Swift
-
- VIP Livecode Opensource Backer
- Posts: 9385
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
All.
Richmond wrote:
1- Create a group of several controls and name it. Ask for the number of groups and you will see "1". Makes sense...
2- Ungroup in any convenient way. Asking for the number of groups now gives "0". Well and good.
3-Now delete all the controls.
4- Make some new controls and group them.
5- The new group has the name of the original.
This is just how LC works, and one can get used to anything. But what about asking for the number of groups and getting "0". Obviously LC stores the fact that there once was a group, and with a certain name, and reconstitutes it when it is called upon to create a new group.
Note that if one deletes the group, as opposed to simply, er, ungrouping the children, that group is gone, as it should be.
But where is that group after it was merely ungrouped? I would not think anything amiss if LC reported that there was indeed a group somewhere, however invisible and inaccessible, as long as it reported a "1" when asked for the number of groups as in #2 above. That query into the number of groups, which is sort of wrong, could cause real problems, it seems to me.
Craig
Richmond wrote:
This fact has always intrigued me. On a fresh card:If you group several objects and then give that group a name, then, at a later date, ungroup the group, that group continues to 'exist' even though it no longer contains the objects it previously contained.
1- Create a group of several controls and name it. Ask for the number of groups and you will see "1". Makes sense...
2- Ungroup in any convenient way. Asking for the number of groups now gives "0". Well and good.
3-Now delete all the controls.
4- Make some new controls and group them.
5- The new group has the name of the original.
This is just how LC works, and one can get used to anything. But what about asking for the number of groups and getting "0". Obviously LC stores the fact that there once was a group, and with a certain name, and reconstitutes it when it is called upon to create a new group.
Note that if one deletes the group, as opposed to simply, er, ungrouping the children, that group is gone, as it should be.
But where is that group after it was merely ungrouped? I would not think anything amiss if LC reported that there was indeed a group somewhere, however invisible and inaccessible, as long as it reported a "1" when asked for the number of groups as in #2 above. That query into the number of groups, which is sort of wrong, could cause real problems, it seems to me.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7154
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Still a beginner who doesn't know how to make a group.
I'm not sure if you meant this was the only way, or the only automated way to select a group, but just in case, you can select a group from the project browser, the application overview, or by toggling the "Select Grouped" icon in the toolbar.Obviously the group has to be SELECTED and that only happens right after you have grouped the objects.
CAsba, regards to Susan.

Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 7154
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Still a beginner who doesn't know how to make a group.
This dates back to MetaCard. The group is retained in RAM temporarily so it can support undo. It's fleeting. Changing cards, for instance, destroys it and it's gone forever. I've needed that undo feature more than once.But where is that group after it was merely ungrouped?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9385
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
Jacque.
Really? To support undo?
Well, why not? So now at least I understand why I can have zero groups, yet still recreate an earlier one from nowhere.
Craig
Really? To support undo?
Well, why not? So now at least I understand why I can have zero groups, yet still recreate an earlier one from nowhere.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9385
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
Jacque.
And I guess groups are unique among all controls in that they have an existence apart from the control they are, if that makes sense. But then why does this not end up with a "XXX"?
I guess undoing an "ungroup" command is not the same as undoing the ungrouping of a phantom group
Craig`
And I guess groups are unique among all controls in that they have an existence apart from the control they are, if that makes sense. But then why does this not end up with a "XXX"?
Code: Select all
on mouseUp
create group "XXX"
answer the number of groups -- get a "1"
ungroup group 1
group --should reconstitute the group?
answer the name of grp 1 --error, no such background
end mouseUp

Craig`
-
- VIP Livecode Opensource Backer
- Posts: 7154
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Still a beginner who doesn't know how to make a group.
Sorry, I think it works mostly for deletions. At least that's what I've used it for when deleting a group accidentally. Not sure about scripted deletions though, I used it when accidentally hitting the delete key while a group was selected.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Still a beginner who doesn't know how to make a group.
Well mostly that’s been a useful “feature” for me - it means I can ungroup, do stuff and re-group and it retains both the group name AND the group scripts automatically.
Your point is taken having said that, but not sure I’ve ever been bitten by this.
As for Undo - there surely can’t be a worse app on either MacOS or Windows than the LC IDE with respect to this.
It’s the one thing that never gets talked about… Undo works almost reliably in the script editor but when it comes to the IDE it’s a throwback to the 90s and a massive weakness of palette interfaces - or is it just me thinking I was deleting something in the message box but actually a control was topmost (even though the msgBox palette seemed like it was)? Bye-bye control and all your lovely scripts… no undo for you!
Why isn’t this talked about more?
Your point is taken having said that, but not sure I’ve ever been bitten by this.
As for Undo - there surely can’t be a worse app on either MacOS or Windows than the LC IDE with respect to this.
It’s the one thing that never gets talked about… Undo works almost reliably in the script editor but when it comes to the IDE it’s a throwback to the 90s and a massive weakness of palette interfaces - or is it just me thinking I was deleting something in the message box but actually a control was topmost (even though the msgBox palette seemed like it was)? Bye-bye control and all your lovely scripts… no undo for you!
Why isn’t this talked about more?
-
- Livecode Opensource Backer
- Posts: 9059
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Still a beginner who doesn't know how to make a group.
Ach: I gave up on 'undo' in LiveCode donkey's years ago, and that is why on big projects (such as my Devawriter) I have an inbuilt autosave + timestamp script that SAVES the thing every 90 seconds . . . Yes, it does clog up my "arteries", and at the end of the day I have to trash the odd 1000 files, but better that than ending up "in the soup" because of the lack of a consistent UNDO feature.
-
- Livecode Opensource Backer
- Posts: 9059
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Still a beginner who doesn't know how to make a group.
One of the snags with HyperCard was that, as soon as you did anything it was saved.
-
- VIP Livecode Opensource Backer
- Posts: 9385
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
Yep. Saved to disk every breath you took. Cost was a bit of time but the "backup" was oftentimes a godSend.One of the snags with HyperCard was that, as soon as you did anything it was saved.
Is that written correctly? "godSend"?
Craig