• 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: devil of a time with an NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: devil of a time with an NSImageView


  • Subject: Re: devil of a time with an NSImageView
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 20 Aug 2009 10:12:26 -0700

On Aug 20, 2009, at 07:21, I. Savant wrote:

I'm not convinced yet that relying on -loadWindow is as good as keeping nib-loading-related startup code in -awakeFromNib.

a. I'm not sure how 'loadWindow' got into this discussion -- the documentation says not to call 'loadWindow' directly but to call 'window' instead and let *it* call 'loadWindow'.


b. 'window' won't return (presumably because an underlying 'loadNib...' doesn't return) until the NIB is completely loaded, including all the invocations of 'awakeFromNib' and the invocation of 'windowDidLoad'. AFAIK it's perfectly safe to invoke 'window' immediately after creating the window controller, or even during the window controller's init method (I've done both without problems).

The only difference is timing -- invoking 'window' early causes the NIB to be loaded at window controller creation time, instead of at the time the window is shown.

c. A couple of weeks ago on this list, one of our Apple experts (Luke, maybe, but I can't remember for sure) said to use the more specialized method (such as 'windowDidLoad') *instead of* the generic 'awakeFromNib', if the class has it.
_______________________________________________


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: devil of a time with an NSImageView
      • From: "I. Savant" <email@hidden>
References: 
 >Statements in Replaced Method execute out of sequence - How? (From: Jerry Krinock <email@hidden>)
 >devil of a time with an NSImageView (From: Jack Carbaugh <email@hidden>)
 >Re: devil of a time with an NSImageView (From: Dave DeLong <email@hidden>)
 >Re: devil of a time with an NSImageView (From: Jack Carbaugh <email@hidden>)
 >Re: devil of a time with an NSImageView (From: Quincey Morris <email@hidden>)
 >Re: devil of a time with an NSImageView (From: Jack Carbaugh <email@hidden>)
 >Re: devil of a time with an NSImageView (From: Jean-Daniel Dupas <email@hidden>)
 >Re: devil of a time with an NSImageView (From: "I. Savant" <email@hidden>)
 >Re: devil of a time with an NSImageView (From: Jean-Daniel Dupas <email@hidden>)
 >Re: devil of a time with an NSImageView (From: "I. Savant" <email@hidden>)
 >Re: devil of a time with an NSImageView (From: Jean-Daniel Dupas <email@hidden>)
 >Re: devil of a time with an NSImageView (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Force crash a cocoa app for Crash Reporter testing
  • Next by Date: Re: Force crash a cocoa app for Crash Reporter testing
  • Previous by thread: Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]
  • Next by thread: Re: devil of a time with an NSImageView
  • Index(es):
    • Date
    • Thread