• 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: Graham Cox <email@hidden>
  • Date: Wed, 29 Jul 2009 01:43:44 +1000


On 29/07/2009, at 1:31 AM, Daniel Child wrote:

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?

Not only are they redundant, this is almost certainly your bug.

Objects in a nib are real objects. Therefore you have two of them, both of the same class. Normally File's Owner is the window controller and this is the object you should be referring to in your code. The other object is getting in the way and likely causing problems.

You generally use a blue cube for any other object, such as a separate subcontroller that your main controller might want to use, but they definitely won't be the same object - they can't be, as each item in a nib is a distinct, real 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


  • Follow-Ups:
    • Re: NSWindow reference remains null after window did load
      • From: Daniel Child <email@hidden>
References: 
 >NSWindow reference remains null after window did load (From: Daniel Child <email@hidden>)
 >Re: NSWindow reference remains null after window did load (From: Graham Cox <email@hidden>)
 >Re: 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: NSWindow reference remains null after window did load
  • 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