Get the names of a group hierarchy

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kolia
Posts: 82
Joined: Thu May 28, 2015 3:53 pm

Get the names of a group hierarchy

Post by kolia » Sat Sep 26, 2015 2:15 pm

Hello,
I have a set of controls that are grouped in several groups. Because this set of controls is duplicated, the mouse handlers will be put in the top level group. Then arises the need to get the names of each group and the name of the control that the user clicked in order to take some action. I understand that target delivers the name of the control that has been clicked. Now how do I get the names of each group that the message path went through?
I hope I'm clear
Thank you
Nicolas
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Get the names of a group hierarchy

Post by bn » Sat Sep 26, 2015 2:50 pm

Hi Nicolas,

check the owner. It gives you the one next up. If the groups are nested you can test until the owner is the card, the one before that is the top group.
check for owner, then for owner of owner and so on. repeat until word 1 of the owner is "card".

Kind regards

Bernd

kolia
Posts: 82
Joined: Thu May 28, 2015 3:53 pm

Re: Get the names of a group hierarchy

Post by kolia » Sat Sep 26, 2015 6:17 pm

Thanks Bernd, this is excatly what I was looking for
Nicolas
Nicolas
LC 7.1 on Windows 8.1 and on MAC OS 10.10.5 Xcode 6.4 - 7.1

Post Reply