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

Re: delegate method called before awakeFromNib?


  • Subject: Re: delegate method called before awakeFromNib?
  • From: "I. Savant" <email@hidden>
  • Date: Mon, 21 Aug 2006 18:57:52 -0400


Have you tried using the debugger? Set a break point on your delegate method and build/debug. Have a look at the call stack, it may reveal something useful.


--
I.S.


On Aug 21, 2006, at 6:49 PM, Ivan Kourtev wrote:

I think you're right. I tried to reproduce the behavior with some other simple test code and I couldn't.

So the question is what causes these delegate messages to be sent -- any ideas? My app is quite simple really, a window with two views inside it (and a few buttons and text fields). I checked and no object even has an outlet to the window, nor is the window a custom class. None of the UI objects calls superview or window either.

--
ivan

On Aug 21, 2006, at 5:43 PM, Shawn Erickson wrote:

On 8/21/06, Ivan Kourtev <email@hidden> wrote:
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.

It sounds like code in some other awakeFromNib (in your code) is potentially causing this early delegate message. I don't think AppKit has any situation that would trigger what you are seeing but it also doesn't do anything to prevent it if your bootstrap code causes it happen.

-Shawn

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


This email sent to email@hidden

_______________________________________________ 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
References: 
 >delegate method called before awakeFromNib? (From: Ivan Kourtev <email@hidden>)
 >Re: delegate method called before awakeFromNib? (From: "Shawn Erickson" <email@hidden>)
 >Re: delegate method called before awakeFromNib? (From: Ivan Kourtev <email@hidden>)

  • Prev by Date: Re: delegate method called before awakeFromNib?
  • Next by Date: Setting The System Date/Time
  • Previous by thread: Re: delegate method called before awakeFromNib?
  • Next by thread: Re: delegate method called before awakeFromNib?
  • Index(es):
    • Date
    • Thread