Group and groups

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
trevix
Posts: 1079
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Group and groups

Post by trevix » Fri Aug 12, 2016 6:38 pm

I may be missing something, so any help is accepted.

There is a group named tList.
Inside tList there are 20 groups named "A,B,C,D,etc.."

Code: Select all

put the number of groups of group "tList" --correctly return "20"
since the groups are correctly layered:

Code: Select all

put the short name of group 3 of group "tList" --correctly return "C"
BUT

Code: Select all

Put the number of group "C" of group "tList" --it return the group number inside the card, "44", not 3
Is there a way to reverse the function, in order to obtain a group number inside a group?
In an ordered list of groups this would speedup the selection, knowing the name of the group.
Thanks
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

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

Re: Group and groups

Post by Klaus » Fri Aug 12, 2016 7:04 pm

Hi Trevix,

maybe something like:
...
## put (the number of group "C" of group "tList" - the number of grp "tList")
## If there is no other grp named C etc, then you can:
put (the number of group "C" - the number of grp "tList")
...


Best

Klaus

trevix
Posts: 1079
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: Group and groups

Post by trevix » Fri Aug 12, 2016 10:30 pm

That's great. Thanks
The overwhelming number of functions of LC sometimes makes me miss that often you need to turn around problems...
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Post Reply