• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: awakeFromNib not called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awakeFromNib not called


  • Subject: Re: awakeFromNib not called
  • From: "Paul J. Lucas" <email@hidden>
  • Date: Tue, 11 Oct 2005 10:02:35 -0700 (PDT)

On Tue, 11 Oct 2005, Paul Bennett wrote:

> 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.

	If I try to change it to my custom class Foo, I get an alert
	that asks, "Do you want to change the file owner to a class
	that does not inherit from NSApplication?"

	Do I?

> 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.

	I get that part.

> 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.

	I did explicitly select "Instantiate Foo" from the Classes menu.

> Just what is Foo?

	A class derived from NSObject whose instance is to be my main
	"Controller" object for the application.

	- 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

  • Follow-Ups:
    • Re: awakeFromNib not called
      • From: James Spencer <email@hidden>
References: 
 >awakeFromNib not called (From: "Paul J. Lucas" <email@hidden>)
 >Re: awakeFromNib not called (From: j o a r <email@hidden>)
 >Re: awakeFromNib not called (From: "Paul J. Lucas" <email@hidden>)
 >Re: awakeFromNib not called (From: Paul Bennett <email@hidden>)

  • Prev by Date: Re: What's the magic that makes cmd-w close a window?
  • Next by Date: runModalForWindow: and sheets
  • Previous by thread: Re: awakeFromNib not called
  • Next by thread: Re: awakeFromNib not called
  • Index(es):
    • Date
    • Thread