The NSTreePopUpButton
class adds supports for binding to a tree controller and displays the tree structure in a hierarchy of menus.
The NSPopUpButton
can only display a one dimensional list of objects. The NSTreePopUpButton
overwrites the binding to content
and selectedIndex
to work with a NSTreeController
instance.
The content
must be bound to arrangedObjects
and selectedIndex
to selectionIndexPath
of a tree controller instance.
The NSTreePopUpButton
creates nested menus to represent the object hierarchy. The state of every menu item in the selected index path is set to NSOnState
.
- The
contentValues
options is currently not supported. You should override thevar description: String
method in your class and return the value you want to display in the menu. - The class does not support multiple selections.
Matthias Hochgatterer
Github: https://github.com/brutella
Twitter: https://twitter.com/brutella
NSTreePopUpButton is available under the MIT license. See the LICENSE file for more info.