Re: window de/activation notifications (was Re: inappropriate tool palette activation problem)
Re: window de/activation notifications (was Re: inappropriate tool palette activation problem)
- Subject: Re: window de/activation notifications (was Re: inappropriate tool palette activation problem)
- From: John Richetta <email@hidden>
- Date: Fri, 19 Oct 2007 14:37:02 -0700
Murat,
You sure nailed my problem! Not sure why, but I did indeed pass in
nil for the sender object parameter when setting up notifications.
Sheesh! I never noticed the verbiage about nil arguments. I was too
busy looking for more info on these particular notifications...
Thanks very much for such a helpful reply. Sorry to waste bandwidth
on such a dumb mistake.
-jar
On Oct 19, 2007, at 1:02 PM, John Richetta wrote:
1. app receives a deactivate (windowDidResignMain) for document A
2. app receives a deactivate for document B
3. app receives an activate (windowDidBecomeMain) for document A
4. app receives an activate for document B
If one then clicks on document A, one will receive the *exact* same
sequence all over again!
I can't fathom why I receive deactivate and activate notifications
for both windows, every time one window is clicked once.
I just put together a quick test app and can't reproduce your results.
I'll bet something's up with how you're registering for
notifications, maybe you're passing 'nil' for the object parameter?
If so, your notification handler will get called whenever ANY window
becomes or resigns main.
Here's my test app
project:<http://www.muratnkonar.com/source-code/Windows.zip>
_murat
_______________________________________________
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