Multiple NIBs and -awakeFromNib problems
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