• 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
delegate method called before awakeFromNib?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

delegate method called before awakeFromNib?


  • Subject: delegate method called before awakeFromNib?
  • From: Ivan Kourtev <email@hidden>
  • Date: Mon, 21 Aug 2006 17:21:12 -0400

Hi,

I have some old code (developed under 10.3) that used to work in 2004. Now in 10.4 I am experiencing a problem which I tracked down to a window receiving a delegate method (windowDidResize) before its awakeFromNib call. Because my window delegate is hardwired to the controller in IB, the delegate method gets handled right away. But because awakeFromNib has not been called yet, the internal program state is not set and so the program crashes.

Is this correct behavior? I thought awakeFromNib was the first method to get sent to the objects after unarchiving the nib file. The code worked flawlessly (well, at least without the above bug) before and I think I must have written a bunch of other stuff based on this assumption [that awakeFromNib gets called before delegate methods]. How is it possible that a UI objects such as the window in my app can receive delegate methods before it is even up on the screen?

It's a simple app and I can work around the problem, it's more of a conceptual question...thanks for any help.

Cheers,

--
ivan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: delegate method called before awakeFromNib?
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Re: Providing application resources to a Plugin
  • Next by Date: Re: Menu Items "Save" "Save As" and "Revert" won't enable for Document
  • Previous by thread: Re: Can I bind the contentArray of an NSArrayController to selectedObjects.array of another?
  • Next by thread: Re: delegate method called before awakeFromNib?
  • Index(es):
    • Date
    • Thread