• 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: Outlets Not Connected In awakeFromNib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outlets Not Connected In awakeFromNib


  • Subject: Re: Outlets Not Connected In awakeFromNib
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 08 Mar 2011 21:16:57 -0800

On Mar 5, 2011, at 11:00 AM, Matt Neuburg wrote:

> On Fri, 04 Mar 2011 10:21:38 +0100, Andreas Grosam <email@hidden> said:
>>
>> Unfortunately, due to the problem described previously, -awakeFromNib does not seem to be always appropriate for its intended use as described in the reference. There are also subtle differences between iOS and Mac OS.
>>
> I'm not grasping where there can be any source of confusion here. awakeFromNib is very simple: it is sent to an object after that object is instantiated from a nib. That's straightforward and dependable and clear - provided you know what a nib is, of course. The only "subtle difference" between Mac OS X and iOS in this regard is that in iOS you are enjoined to call super in your implementation. (There are some memory management differences for objects instantiation from nibs between Mac OS X and iOS, but that's a different matter.)

Okay, I was just wrong about this. On iOS, a UIViewController's awakeFromNib is called if the UIViewController is instantiated from a nib. But on Mac OS X, an NSViewController's awakeFromNib is called both if the NSViewController is instantiated from a nib and if a nib is loaded with that NSViewController (already in existence, obviously) as owner. That is a *profound* difference between the two. Sorry about that. m.

--
matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com


_______________________________________________

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: 
 >Re: Outlets Not Connected In awakeFromNib (From: Matt Neuburg <email@hidden>)

  • Prev by Date: [MEET] CocoaHeads-NYC this Thursday -- please RSVP ASAP
  • Next by Date: NSTextView scaled using scaleUnitSquareToSize - alignment issue
  • Previous by thread: Re: Outlets Not Connected In awakeFromNib
  • Next by thread: InterfaceBuilder - send action to self?
  • Index(es):
    • Date
    • Thread