On Mon, Jan 31, 2005 2:50 AM, Mike Kluev <email@hidden> wrote:
>>>> I only use commands for menu items. All my control handling goes
>>>> through control hit events.
>>>
>>> Including kEventControlSimulateHit, right?
>>
>> I've never used that event.
>
>Then, doesn't your app have problems on selecting controls with
>keyboard (default/cancel buttons, full keyboard access, universal
>access, etc). I believe kEventControlSimulateHit event is sent
>instead of the usual kEventControlHit in such cases.
That's the beauty of the standard event handler. If you don't handle
kEventControlSimulateHit, then it gets handled for you and converted to
kEventControlHit. If you don't handle that, and your control has a
command ID, then it ends up as a kEventCommandProcess event. And if you
don't handle that, it gets ignored.
The kEventControlSimulateHit event is there so you can tell the
difference between simulated and "real" events if, for some reason, you
need to treat them differently. But in general, I prefer to let all the
UI objects do their thing and catch only the higher level events. Not
only is it easier, but I'm sure to get all the proper default behaviors
that way.
-- Bob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden