0

I am building my NSToolbarItem(s) programmatically but they are not selectable. The ones added from the interface builder are selectable because there i have the option of checking the 'Selectable ' option. But the NSToolbarItem class has no setSelectable method.

The NSToolbarDelegate protocol is implemented and the toolbarSelectableItemIdentifiers method is called but they are still disabled after returning the same identifiers the toolbarDefaultItemIdentifiers method returns

Developing on OS X 10.10, targeting 10.7

Edit:

- (NSArray *) toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar{
NSMutableArray* ids = [[NSMutableArray alloc] init];

for(NSToolbarItem* item in [_my_toolbar items]){
    [ids addObject:item.itemIdentifier];
}

NSLog(@"Selectable ids are %@", ids);
return ids;

}

This is my implementation.(All the items should be selectable);

SiWM
  • 90
  • 1
  • 9
  • Does this help? http://stackoverflow.com/questions/566793/highlight-nstoolbaritems – John May 16 '15 at 14:15
  • Not quite. I updated my question with the toolbarSelectableItemIdentifiers implementation – SiWM May 16 '15 at 14:32

0 Answers0