Mailing Lists: Apple Mailing Lists

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

NSManagedObjects bound to an NSPopUpBotton in a toobar



I learnt something today. Maybe it will be useful to you guys ... didn't see anything in any of the usual Cocoa places describing it ... so I hope documenting here may save someone a bit of hassle at some point. I'll probably drop a line in Apple's radar after I play with it a bit more ... so anywho ...

If you have an NSToolbar ... and if you put an NSPopUpButton within it ... and if you bind that NSPopUpButton to a set of NSManagedObjects by way of NSArrayController, then you have to implement initWithCoder and encodeWithCoder in your NSManagedObject subclass. The NSCoding methods can be stubs that do nothing but return and return nil respectively ... but if you don't adopt the NSCoding protocol (even though it's useless in CoreData), then whenever an end user tries to customize your toolbar, he/she will experience all sorts of fun problems. :)

Back to cocoa-dev lurking.  :)
_______________________________________________

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.