On Jan 12, 2009, at 11:41 AM, Quincey Morris wrote:
- (void) init { [super init]; applicationHasStarted = NO; if (![[NSApplication sharedApplication] delegate]) { [[NSApplication sharedApplication] setDelegate:self]; } }This isn't going to work because your app delegate object is in your NIB file and is (re)created at startup by unarchiving. Therefore, 'initWithCoder' will be called instead or 'init'.
I don't think this is precisely true, particularly for regular objects (the plain blue cube). At least, none of mine behave this way. Of course, none of the objects I use in this way implement NSCoding, and maybe that matters. All other non-view objects do instantiate with initWithCoder:, as I understand, just not generic custom objects.
Best, Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business" _______________________________________________ Cocoa-dev mailing list ([email protected]) 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]
