Re: Beginner pleads for help...
Re: Beginner pleads for help...
- Subject: Re: Beginner pleads for help...
- From: David Remahl <email@hidden>
- Date: Wed, 04 Jul 2001 14:18:11 +0200
on 01-07-04 14.00, Steve Woodward at email@hidden wrote:
>
Sorry to have to ask, but this one thing has been driving me crazy. I'm
>
trying to learn how to create and show a second window from a "main"
>
window. I've looked at the ToDo example in "Learning Cocoa" as well as
>
the SimpleMultiWindow example. The SimpleMultiWindow really throws me
>
off, they subclass NSApplication instead of NSObject (which I've been
>
doing all along), then for the second window they subclass
>
NSWindowController but never instantiate it...it seems to me that the
>
confusion lies in the IB connections to File's owner and to the
>
delegate.
When you load a nib, you instanciate an object of the same type as the
file's owner. Otherwise, how would you get a hold of that object after you
loaded the nib...
Subclassing NSApplication is a method you can use if you need to interfere
with the standard handling NSApp does for you. It allows you to fiddle with
for example events in non-standard ways. Often it is enough to use an
application delegate instead.
>
I had hoped that you would simply create a new nib file, then
>
load that nib file at run time and show the window. I'm obviously
>
missing something rather basic here, and would be greatly appreciative
>
of any advice from anybody! Many thanks in advance.
/ hope its a bit clerarer now.
// i dont have a lot of time right now, but if you need more guidance,
// either wait for some1 else to respond or mail me again (privately or on
the list
/// david