• 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
Multiple NIBs and -awakeFromNib problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple NIBs and -awakeFromNib problems


  • Subject: Multiple NIBs and -awakeFromNib problems
  • From: Jeffrey J Barbose <email@hidden>
  • Date: Mon, 27 Aug 2001 16:24:32 -0700

hi all..

following some of hints from apple and from the Learning Cocoa book for supporting multiple-nib apps, i'm having a problem with -awakeFromNib being called twice for my controller object.

in my main nib, i have an instance of MyController, a subclass of NSWindowController. I can understand why -awakeFromNib gets called on this controller.

however, when i choose a menu item calls MyController's -showWindow, MyController's -awakeFromNib gets called AGAIN. Note that MyController is NOT instantiated in the MyController.nib file, but MyController set as the File's Owner's class, as is required.

My understanding was that only the instances (windows, other controllers) in the nib file receive -awakeFromNib.

So, -awakeFromNib gets called twice...once when the main nib instantiates it (as expected), and again when -showWindow is called (NOT expected)>

thanks in advance,

jeff


  • Follow-Ups:
    • Re: Multiple NIBs and -awakeFromNib problems
      • From: Ondra Cada <email@hidden>
    • Re: Multiple NIBs and -awakeFromNib problems
      • From: Kurt Revis <email@hidden>
    • Re: Multiple NIBs and -awakeFromNib problems
      • From: Henri Lamiraux <email@hidden>
  • Prev by Date: Re: NSTableView
  • Next by Date: Re: Multiple NIBs and -awakeFromNib problems
  • Previous by thread: Re: Learning to program Cocoa
  • Next by thread: Re: Multiple NIBs and -awakeFromNib problems
  • Index(es):
    • Date
    • Thread