Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Custom Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Events




On Jul 7, 2007, at 11:03 PM, David Landon wrote:

The Windows code I am porting keeps track of windows as they are
created/destroyed and sends notifications only to the interested subset of
windows for each event. But broadcasting to all windows with appropriate
event parameters would work. Much easier too.


Though I thought messages sent to the application event target were only
sent to the active or focused window (like menu commands for instance). Is
there a way for inactive window event handlers to grab such events? Or is
my (definitely novice level) understanding of the Carbon event model
incorrect?

Perhaps you're thinking of the user focus event target, which is sort of a proxy for where keyboard events will go, usually the active window. Events sent to the application event target go to the application event target, period. Anyone who installs appropriate handlers on that target can receive them. The only trick is that your handlers should return eventNotHandledErr, so the event won't be eaten by the first handler that sees it.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

This email sent to email@hidden

References: 
 >Re: Custom Events (From: David Landon <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.