• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWindow reference remains null after window did load
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow reference remains null after window did load


  • Subject: Re: NSWindow reference remains null after window did load
  • From: Randall Meadows <email@hidden>
  • Date: Mon, 27 Jul 2009 21:45:17 -0600

On Jul 27, 2009, at 8: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.

Eventually the window does load, but only in its basic nib-drawn form, ignoring all of the initialization that the controller is supposed to do except for two text fields, which do for some reason get initialized.

I've spent hours checking connections and stepping through code. Does anyone have a suggestion where I can look to track down this issue.

This came up in another chat I had today. In that case, the window was not set to be visible at launch, so the system deferred actually loading it until it was ready to be shown. Perhaps that's happening to you?
_______________________________________________


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


References: 
 >NSWindow reference remains null after window did load (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: NSWindow reference remains null after window did load
  • Next by Date: Re: Dictionary with enum keys?
  • Previous by thread: Re: NSWindow reference remains null after window did load
  • Next by thread: Re: NSWindow reference remains null after window did load
  • Index(es):
    • Date
    • Thread