Re: NSWindow reference remains null after window did load
Re: NSWindow reference remains null after window did load
- Subject: Re: NSWindow reference remains null after window did load
- From: Daniel Child <email@hidden>
- Date: Tue, 28 Jul 2009 11:31:31 -0400
Sorry, I misled you.
There is a controller object and File's owner. File's owner's class is
set to the window controller subclass. The window outlets for both of
the win controller and file's owner point to the window itself.
Which brings up another question: do I need the "object" (blue cube)
at all in the nib if the file's owner is of the same class and
presumably represents the same object. Are they redundant?
On Jul 27, 2009, at 10:57 PM, Graham Cox wrote:
On 28/07/2009, at 12:39 PM, Daniel Child wrote:
I have a master controller loading a window controller subclass,
but for some reason, I cannot get a pointer to the window loaded in
the XIB file. I've looked at every connection, and I've also tested
the order by of method calls.
In the window controller's init:
[self window] yields nothing.
Likewise in awakeFromNib and windowDidLoad.
It's totally mysterious because I have practically identical setups
in two other programs, the only difference being that they used nib
files and this is xib. But from what I understand, that shouldn't
matter.
For what it's worth, in the XIB file, the window outlet goes to
File's Owner (the window controller subclass). The window contains
a table, and (unsurprisingly) [myTable window] also yields nothing.
If this is literally true, isn't this the problem? The window outlet
of the controller should go to... ta-daaaa!... the WINDOW. That is,
the actual window, not its controller, or a view within it, but the
NSWindow object.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden