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: kEventCommandUpdateStatus, slow typing, and menu key commands that don't contain the command key



On 8/30/03 10:30 AM, Jonathan Guyer didst favor us with:

> AlphaX is still largely WNE based and it is absolutely littered with
> menu key combinations that do not contain the command key (Alpha
> borrows a lot of bindings from emacs, as well as inventing a
> multitude of its own). Up until now, we've had application wide
> handlers for kEventMenuEnableItems and kEventCommandUpdateStatus that
> just return noErr and typing speed is fine.
>
> Lately, I've been trying to implement the YAST control in some modal
> windows and for the life of me couldn't figure out why it wasn't
> getting an Edit menu. I finally remembered these stub handlers of
> ours and changed them to eventNotHandled; sure enough, YAST gets its
> Edit menu and it updates the way it's supposed to, but typing (both
> in YAST and everywhere else in my app) slows to a crawl.
>
> I've put a breakpoint at _InvalidateMenuKeyCache and it's not being
> called as I type keys, only as menus get shifted around.
> IsMenuKeyEvent is called for every keypress, though, so I guess
> that's because of my non-command-key-modifier menu items? Is there
> anything we can do? (getting rid of the offending menu keys isn't an
> option; I'd be burned at the stake)

The only solution I've found is to use kEventMenuEnableItems handlers. You
don't really give details of how you're using them or how you're adjusting
your menu items. Are you returning eventNotHandledErr from all these
handlers? Are you not using kEventMenuEnableItems and
kEventCommandUpdateStatus to adjust your menus? Do you have
kEventMenuEnableItems installed on any windows?

Larry
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >kEventCommandUpdateStatus, slow typing, and menu key commands that don't contain the command key (From: Jonathan Guyer <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.