On Jun 16, 2014, at 13:36 , Trygve Inda <cocoa...@xericdesign.com> wrote:
> In the later method, if the encoded object does not contain kValueCKey, the > object created will still have the correct default value for valueC (9). It won’t, because you assigned nil to valueC *after* it’s set to the default. Personally, I’d be inclined to have initWithCoder call super, because in more complicated examples the logic tends to be quite different. If you have common initialization (such as the initial setting of defaults), put them in a private method that both initializers call. _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com