Re: [Pyobjc-dev] Re: Multiple Nibs
Brought to you by:
ronaldoussoren
From: b.bum <bb...@ma...> - 2004-05-08 06:59:15
|
On May 7, 2004, at 11:30 PM, Winston Wolff wrote: > Ah yes, your description definitely helps. Also this line here fixes > my problem, thank you so much: > >> Neither, it is unfrozen by NSBundle.loadNibNamed_owner_ > > But that raises another question. The above line works to unfreeze > your second NIB file, but in all the example code, where is the first > NIB file unfrozen, i.e. MainMenu.nib? Is it hidden somewhere in > AppHelper.runEventLoop(argv=[]) It is a part of standard Cocoa. Open up any random Cocoa App's wrapper and have a look at the Info.plist. You will find an entry with a key/value pair like... <key>NSMainNibFile</key> <string>Edit</string> ... that, in this case, means that NSApplication will automatically load Edit.nib as a part of startup (the above came from TextEdit.app/Contents/Info.plist. Document based apps do something similar, but there is a method that you can override on your NSDocument subclass to return the NIB name (or you can override -makeWindowControllers and set everything up by hand, if that floats your boat). b.bum |