Re: awakeFromNib and windowWillLoad : basic question
Re: awakeFromNib and windowWillLoad : basic question
- Subject: Re: awakeFromNib and windowWillLoad : basic question
- From: Ben Dougall <email@hidden>
- Date: Fri, 4 Jul 2003 14:58:56 +0100
On Friday, July 4, 2003, at 09:57 am, jean Bousquet wrote:
Thanks Ben,
I just wanted to clarify in my mind the differences between the 2
methods :
awakeFromNib and windowWillLoad used in a WindowController, that is
why I
used both just to see when (in which order) there were invoked.
It appeared that in the case of a WindowController in the MainMenu.nib
which
is connected to a window which is automatically displayed at launching
time,
windowWillLoad is not invoked.
From the Aaron Hillegass's book "Cocoa programming with Mac OSX" p151
is
yeah i'm following that book at the moment. just gone past that bit.
quoted :
"After the nib file is loaded, the Controller will be sent
windowDidLoad.
This is an opportunity (like awakeFromNib ) for the controller object
to
initialize the UI objects "
But the context in the Aaron's book is different from mine.
exactly - that's kind of what i was trying to get at with
could this because awakeFromNib and windowDidLoad are both used to do
the same thing? what i mean is, that you use one or the other -
they're
2 of the same kind?
when in one context you get the awakeFromNib use, and in another you
get windowWillLoad use. (as i say i'm completely guessing here).
from that part you quoted from it looks like, to me, that awakeFromNib,
windowControllerDidLoadNib and windowWillLoad can all be used in the
same sort of way, but as to which one you can use, which one you've got
access to, is dictated by the specific situation.
i'm really hoping someone who knows what they're talking about can
clarify this please? :) i'd like to know this myself.
In his case his
window is not in the MainMenu.nib and not loaded at launch time but by
another object on demand. In that last case windowDidLoad is really
invoked.
I would like to know for sure if I made a mistake or if there is an
explanation for windowDidLoad not to be invoked.
Jean
De : Ben Dougall <email@hidden>
Date : Fri, 4 Jul 2003 00:34:39 +0100
@ : jean Bousquet <email@hidden>
Cc : <email@hidden>
Objet : Re: awakeFromNib and windowWillLoad : basic question
could this because awakeFromNib and windowDidLoad are both used to do
the same thing? what i mean is, that you use one or the other -
they're
2 of the same kind? i'm making a complete guess seeing as no one else
has answered.
On Thursday, July 3, 2003, at 04:48 pm, jean Bousquet wrote:
Hello,
Here a basic question from a newbie to understand when awakeFromNib
and
windowWillLoad are triggered.
In the mainMenu.nib is a window which is the main window of the
appli.
In
its windowController subclass I wrote the 2 methods :
-(void)awakeFromNib
{
NSLog(@"awakeFromNib");
}
-(void)windowDidLoad
{
NSLog(@"windowDidLoad");
}
just to see when these methods are triggered.
awakeFromNib is triggered at launch time which seems normal but
windowDidLoad is never triggered although the window is correctly
displayed
on screen at launch time.
Did you think I made some thing wrong or is it normal windowWillLoad
is not
triggered in this situation ? Facing the last case I browsed the doc
but
could not understand why windowWillLoad is not invoked.
May be some body could help ?
Thanks
Jean
_______________________________________________
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.
_______________________________________________
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.