Disabling a NSToolbarItem triggering a segue

84 Views Asked by At

I have a NSToolbar with many NSToolbarItems, some of them connected to methods and a couple of them directly trigger a segue (one a sheet segue and the other a show segue).

I have implemented:

-(BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem {
...
}

to enable/disable the buttons as I need. Unfortunately, the method is never called for the two NSToolbarItems that trigger a segue.

All the NSToolbarItems have the Autovalidates at NO.

What am I missing?

0

There are 0 best solutions below