Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't customize toolbar in category



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.