Does Cocoa connection binding to NSToolbarItem prevent deinitializing?
问题 Trying to set the selected segment of an NSToolbarItem that's an NSSegmentedControl via connection binding to a property (optionSegment). Subclassing the window controller as such class MyWindow: NSWindowController { dynamic var optionSegment: Int = 0 override func windowDidLoad() { super.windowDidLoad() } } Alternately, put the optionSegment property in the NSDocument subclass and bind to that. Each work. The problem is that with this binding, or seemingly any binding to NSToolbarItem , none