It's possible I simply don't understand bindings. Goal: A menu has three options. A toolbar item is a segmented controller that reflects those three items. User can choose any of the three from the menu or the toolbar item. If chosen from the menu, the selectedSegment of the control should reflect the choice.
Added a property to my NSDocument subclass:
class Document: NSDocument {
var optionSegment: Int = 0
Created a binding from the control to the property. The Bindings Inspector of Storyboard is for "Selected index (Document.optionSegment)" In the action method for the menu items, I set the doc's optionSegment to 0, 1, or 2.
I'd have thought that that would suffice, but nothing happens. Selecting a menu item does not change the control's selectedSegment and clicking the control in the toolbar doesn't change the property.
What might I be missing or not understanding? Tried binding to the toolbaritem's control and control cell, separately and together, and nothing. Not sure what to try next.
Thanks for suggestions.