Re: init code in ApplicationNotifications/awakeFromNib
Re: init code in ApplicationNotifications/awakeFromNib
- Subject: Re: init code in ApplicationNotifications/awakeFromNib
- From: Ondra Cada <email@hidden>
- Date: Wed, 18 Sep 2002 02:44:28 +0200
On Wednesday, September 18, 2002, at 02:06 , Robert Tillyard wrote:
I have an application with two NIB's and I appear to get an
awakeFromNib twice once when MainMenu.nib loads and again when my
AboutPanel.nib loads.
That's interesting but since you don't talk about that any further in
your
note it's impossible to help you.
Plain lie. It is quite enough for an educated guess.
I presume (a) you are speaking of the Controller's awakeFromNib, and (b)
the Controller is the File's Owner for the second NIB. Right?
If so, the thing is completely clear (and right). For obvious reasons,
when a NIB is loaded, all the objects from it get awakeFromNib *including
its File's Owner*. In other words, you controller gets the first
awakeFromNib when the main NIB which contains it is loaded; it gets the
second one as File's Owner of the secons NIB when it is loaded.
Is it so?
(1) You don't need anything of the sort in Controller.h. The book is
wrong
to make you do that. (I believe I can show that it makes errors at the
rate
of approximately one per page, many of them very serious.)
I also have the Aaron Hillegass and the O'Reilly/ADC Learning Coca books,
maybe I should read them first!
Can't really say -- I have got just the Simson's book, and I must admit I
haven't read it too religiously, just quickly scanned.
Though, I *did* read its predecessor (NeXTStep Programming, Step One)
religiously, and I *am* sure that it was just bloody excellent. So, I
think that reading the new one would not be a vasted time either.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.