Page 1 of 1

Getting only the immediate child groups of a group

Posted: Fri Sep 14, 2007 4:25 pm
by jason.lubken
I've tried something like...

Code: Select all

function childGroupExists theChildGroupName, theParentGroup
  repeat with i = 1 to the number groups in theParentGroup
    if the name of group i of theParentGroup is theChildGroupName then
      return true
    end if
  end repeat
  return false
end childGroupExists

... but "the number of groups" is not restricted to immediate children only, so the code iterates through all of the child and grandchild groups of theParentGroup.

Is there something like groupNames for groups instead of cards?

Thanks

Posted: Fri Sep 14, 2007 5:45 pm
by trevordevore
Unfortunately there is no way of getting direct Group children. This is very unfortunate as interrogating groups for immediate children becomes very slow as the number of controls grows.