a group of groups

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
kevin11
Posts: 101
Joined: Thu Aug 11, 2011 5:02 pm

a group of groups

Post by kevin11 » Tue Jan 31, 2012 2:55 pm

Hi,

I am trying to group some groups, and then name the supergroup I have just created.

The dictionary, says :
To refer to the newly-created group, use the last keyword:
group button "Yes" and button "No"
set the name of last group to "Do It"


However, if I execute : group group "fred" and group "Mary", I get a new group named group id 12345
but "show the name of the last group" gives "Mary", which I don't want to rename.

How then do I get the name of the super-group, so that I can rename it ?

Thanks

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

Re: a group of groups

Post by dunbarx » Tue Jan 31, 2012 3:02 pm

The "last" keyword is not stable with groups. Check out the dictionary entry. I prefer using the templategroup.

Craig Newman

Klaus
Posts: 14196
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: a group of groups

Post by Klaus » Tue Jan 31, 2012 3:09 pm

Hi Kevin,

yep, if you group some groups THE LAST GROUP is of course not the newly created group!

But you can check "the owner" of these groups and acct accordingly like this:
...
group group "fred" and group "Mary"
set the name of the owner of grp "fred" to "Ginger ermmm... Mary and Fred"
...
Tested and works! :D

Best

Klaus

kevin11
Posts: 101
Joined: Thu Aug 11, 2011 5:02 pm

Re: a group of groups

Post by kevin11 » Tue Jan 31, 2012 3:19 pm

dunbarx wrote:The "last" keyword is not stable with groups. Check out the dictionary entry. I prefer using the templategroup.

Craig Newman
which dictionary entry do you mean ?

kevin11
Posts: 101
Joined: Thu Aug 11, 2011 5:02 pm

Re: a group of groups

Post by kevin11 » Tue Jan 31, 2012 3:34 pm

Klaus wrote:Tested and works! :D
Indeed it does ! Thanks Klaus. Your solution should be added to the dictionary entry.

Post Reply