I have a simple Swift cocoa application. The main window contains:
- a toolbar with some Image Toolbar Items
- a NSViewController (named ViewController)
In ViewController I have implemented:
func validateToolbarItem(_ item: NSToolbarItem) -> Bool
to enable the buttons as per my requirements.
Unfortunately, the validateToolbarItem is never called.
In an another Objective-c application I have exactly the same scenario and the function:
-(BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem
is properly called.
How do I sort this problem out? What do I miss in swift?
Thks.