On Thu, Feb 21, 2008 at 2:41 PM, Ken Ferry <[EMAIL PROTECTED]> wrote: > What's guaranteed is that all init methods on a class will funnel into > one of the designated init methods. A subclasser should always > override all designated initializers of the superclass (if he needs to > do work at initialization time). Then you're guaranteed to have your > setup performed no matter how the object is created.
What I'm saying is that I'm not sure this is guaranteed to be true for unarchiving. Since (with rare exception) any override of a designated initializer is supposed to call super's implementation, it would be very easy to introduce improper behavior by calling -[NSView initWithFrame:] at design time, archiving the object graph into the nib, and then calling -[MyView initWithFrame:], which then invokes -[NSView initWithFrame:], when unarchiving the view from the nib. I think the Apple docs are pretty clear that there is no guarantee whatsoever that any initializer will be called on your objects when unarchiving from a nib. The nib unarchiving mechanism doesn't really care about your setters, getters, and initializers. It restores whatever state it knew about when it archived the object, trusting you to implement -awakeFromNib if you need subclass-specific processing. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]