Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window de/activation notifications (was Re: inappropriate tool palette activation problem)



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >window de/activation notifications (was Re: inappropriate tool palette activation problem) (From: John Richetta <email@hidden>)
 >Re: window de/activation notifications (was Re: inappropriate tool palette activation problem) (From: Murat Konar <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.