Re: Showing a window from a second nib
Re: Showing a window from a second nib
- Subject: Re: Showing a window from a second nib
- From: Tom Harrington <email@hidden>
- Date: Sun, 06 Jan 2002 20:43:17 -0700
email@hidden wrote:
Hmm... I don't have that book. I hear it's good though.
I like it so far, I've made a lot of progress considering how much time
I've spent so far. I tried using the O'Reilly book but somehow it just
made my eyes glaze over.
NSWindowController is as good as any subclass if you're not doing
anything special, like in an about box.
This is a simple app that has this object instantiated in MainMenu.nib.
Connect the menu item to showAboutBox:
In the nib called AboutBox, just put whatever you want in the panel...
connect the "Ok" button to the panel's performClose: action and set the
custom class of the File's Owner to NSWindowController, and connect the
window outlet to the panel.
Then everything should work fine... If you can't get it to work, let me
know and I'll put the project up on the net.
<rest delete>
Thanks alot, that was a big help. It worked fine once I realized that
I'd forgotten to set File's Owner's "window" outlet in IB.
--
Tom Harrington, Cybernetic Entomologist
email@hidden