views:

104

answers:

1

I suspect that the number of dividers in an NSSplitView is equal to [[MySplitViewObject subviews] count] -1 and that the index of any given divider in an NSSplitView is equal to the index of the subview to the left of or above the divider (depending on the NSSplitView's orientation).

Is it, or is there some undocumented and exposed property of the NSSplitView that returns a list of the dividers?

+2  A: 

I don't know any other way to know the number of dividers in a NSSplitView. The result is always accurate, because even hidden subviews are only collapsed.

As for the order (both views and dividers), it is guaranteed by the documentation:

Divider indices are zero-based, with the topmost (in horizontal split views) or leftmost (vertical) divider having an index of 0.

Note: You can also create a category that hides the computation of the number of dividers.

Laurent Etiemble
Thanks for the category tip. That's a better way to handle this than had occured to me.
Randall