     /// This methods returns nil when nodes is empty.
     ///
     /// :returns: A menu for nodes.
-    private class func menuForNodes(nodes: NSArray, action: Selector, target: AnyObject) -> NSMenu? {
+	private class func menuForNodes(nodes: Array<NSTreeNode>, showsStateColumn: Bool, action: Selector, target: AnyObject) -> NSMenu? {
         if nodes.count == 0 {
             return nil
         }
         
         let menu = NSMenu()
+		menu.showsStateColumn = showsStateColumn;
+		
         for node in nodes {
             if let object = node.representedObject as? NSObject {
                 let item = NSMenuItem(title: object.description, action: action, keyEquivalent: "")
                 item.target = target
-                item.representedObject = node
-                if let childNodes = node.childNodes as? Array<NSTreeNode> {
-                    if let subMenu = menuForNodes(childNodes, action:action, target: target) {
+                item.representedObject = node				
+                if let childNodes = node.childNodes {
+					if let subMenu = menuForNodes(childNodes, showsStateColumn: menu.showsStateColumn, action:action, target: target) {
                         item.submenu = subMenu
                     }
                 }

        static var SelectionIndex = "SelectionIndex"
        static var Content = "Content"
    }
    
    override func bind(binding: String, toObject observable: AnyObject, withKeyPath keyPath: String, options: [NSObject : AnyObject]?) {
        switch binding {
        case NSContentBinding:
            observedContentObject = observable
            observedContentKeyPath = keyPath
            observable.addObserver(self, forKeyPath: keyPath, options: NSKeyValueObservingOptions.Initial, context: &Context.Content)
        case NSSelectedIndexBinding:
            observedSelectionObject = observable
            observedSelectionKeyPath = keyPath
            observable.addObserver(self, forKeyPath: keyPath, options: NSKeyValueObservingOptions.Initial, context: &Context.SelectionIndex)
            break
        default:
            super.bind(binding, toObject: observable, withKeyPath: keyPath, options: options)
        }
    }
    
    override func observeValueForKeyPath(keyPath: String, ofObject object: AnyObject, change: [NSObject : AnyObject], context: UnsafeMutablePointer<Void>) {
        switch context {
        case &Context.Content:
            if let nodes = object.valueForKeyPath("\(observedContentKeyPath!).childNodes") as? [NSTreeNode] {
                // This replaces the whole menu instance and clears all selected items from the UI
                // But the selection index will be updated by the tree controller automatically
                self.menu = NSMenu.menuForNodes(nodes, action:"onMenuItemSelected:", target: self)
            }
        case &Context.SelectionIndex:
            if let indexPath = object.valueForKeyPath(observedSelectionKeyPath!) as? NSIndexPath {
                menu?.deselectAllItems()
                selectItemsAtIndexPaths(indexPath)
            }
        default:
            break
        }
    }
    
    /// Called from a menu item when selected from the user.
    func onMenuItemSelected(sender: NSMenuItem) {

            selectItemsAtIndexPaths(node.indexPath)
            if let treeController = self.observedSelectionObject as? NSTreeController {
                if treeController.setSelectionIndexPath(node.indexPath) == false {
                    print("Could not select index path \(node.indexPath)")
                }
            }
        } else {
