Can't customize toolbar in category
Can't customize toolbar in category
- Subject: Can't customize toolbar in category
- From: "Ryan Poling" <email@hidden>
- Date: Sat, 26 May 2007 12:21:38 -0700
I'm having a strange problem... I added a category on my Controller
class to separate out all the NSToolbar delegate methods but still have
access to various ivars in the Controller. Everything works as expected
except for customizing the toolbar - when I try to customize, I get the
following error message in the console:
2007-05-26 12:12:01.626 ProgName[5608] *** -[Controller
encodeWithCoder:]: selector not recognized [self = 0x32f040]
Any ideas on how to fix this? It's been a while since I've used a
category for anything, so perhaps I'm forgetting something about the way
they work.
I have this init method in my category which is called from the
Controller's awakeFromNib method.
- (void)setupToolbars {
// setup and add the toolbars
mainToolbar = [[NSToolbar alloc] initWithIdentifier:@"mainToolbar"];
[mainToolbar setDelegate:self];
[mainToolbar setDisplayMode: NSToolbarDisplayModeIconOnly];
[mainToolbar setAllowsUserCustomization:YES];
[mainToolbar setAutosavesConfiguration:YES];
[mainWindow setToolbar:mainToolbar];
}
Thanks,
-Ryan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden