Re: awakeFromNib not called
Re: awakeFromNib not called
- Subject: Re: awakeFromNib not called
- From: Paul Bennett <email@hidden>
- Date: Tue, 11 Oct 2005 17:33:21 +0100
On 10/6/05, Paul J. Lucas <email@hidden> wrote:
>
> It says in part:
>
> Typically, you implement awakeFromNib for the
> class you associate with the "File's Owner" of
> the nib file.
>
> In Interface Builder (IB), I did set the destination of the
> File's Owner delegate outlet to be my class Foo.
That's not the same thing.
The documentation is referring to the class of the File's Owner
itself. (In Interface Builder, select the File's Owner and pick
'Custom Class' from the Inspector (Cmd-5). That class there (probably
NSApplication if you've just created a simple Cocoa Application) is
the one whose -awakeFromNib will be called.
> > How are the instances of class Foo involved in your nib loading? Are they
> > instantiated in your nib file, or the owner of a nib file, or what?
>
> Other than what I said above, I don't explicitly instantiate or
> allocate anything.
When the objects in your Nib (e.g. controls, windows and custom
objects that you have instantiated) are deserialised from the Nib,
then *their* -awakeFromNib methods will be called.
It sounds very much as if no instance Foo class is loading the Nib,
and no instance is contained within the Nib. Hence, Foo's
-awakeFromNib is not being called.
Just what is Foo? If you don't have an instance of it, how could it
possibly be awakened?
Paul.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden