[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindowController doesn't load Gorm file.

From: Nicola Pero
Subject: Re: NSWindowController doesn't load Gorm file.
Date: Sun, 16 Feb 2003 02:05:26 +0000 (GMT)

> I try to load the Gorm file using NSWindowController 
> -initWithWindowNibName:Owner:.
> I have an outlet connected to the window (actually, panel).
> At this step, the window is not loaded.
> Then I try [NSWindowController window].
> The window is loaded, but [NSWindowController window] return nil.
> I think it is a bug unless I did something wrong.
> I attach the test files.


If I remember correctly, I think you want to use -initWithWindowNibName:,
which sets the 'owner' of the nib to be the window controller.

Then, in the nib file you need to create an outlet which sets the 'window'
of the 'owner' to be the window in the nib.

That way, when the window controller loads the nib, it is the file owner,
and its window is set to be the loaded window.

I'd suggest this route ... if I remember correctly, this route is the
simplest way of using a NSWindowController - so I'd suggest this route as
a start - using a different 'owner' seems confusing.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]