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);