Ok, I'm totally lost on this one. This program is basically a tableView showing a list of items from an array. The window has a toolbar, with a few buttons that I've created in Interface Builder. One of these buttons is a delete button that is using a binding on it's Enabled status to ArrayController.selection.canDelete. canDelete is a method of the object that the array is using, stating simply whether or not you can delete it, with a simple boolean value.
This should be simple. After all, when I used a Delete button in the window, configured exactly the same way, it worked. The button was disabled if you selected an item in the list that has a NO value for canDelete. However, when I use an NSToolbarItem instead of an NSButton, it doesn't work. Oddly, what happens is that when you select an item that can't be delete, the button sort of "blinks" into a disabled(greyed out) state, then goes back to being enabled.
I'm stumped on this, so any advise would be helpful.
This should be simple. After all, when I used a Delete button in the window, configured exactly the same way, it worked. The button was disabled if you selected an item in the list that has a NO value for canDelete. However, when I use an NSToolbarItem instead of an NSButton, it doesn't work. Oddly, what happens is that when you select an item that can't be delete, the button sort of "blinks" into a disabled(greyed out) state, then goes back to being enabled.
I'm stumped on this, so any advise would be helpful.