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/31/03 11:17 AM, Jonathan Guyer didst favor us with:

> At 2:37 PM -0400 8/30/03, Laurence Harris wrote:
>
>> 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.
>
> Sorry about that; I wasn't clear. Alpha is largely driven by Tcl
> scripts (sort of the way emacs is driven by lisp scripts). Those
> scripts do the menu adjusting. Likewise, we do our own key bindings
> (in gross violation of the HIG, Alpha allows you to bind any key
> combination to any Tcl script without necessarily associating it with
> a menu item; we've got a kEventTextInputUnicodeForKeyEvent handler
> that calls through to our crufty old code for that).

I'm still not 100% clear on how your code works (okay, not even 90% clear
LOL), but here are some thoughts:

- The slowdown is almost certainly the result of calling the
kEventCommandUpdateStatus handlers. If you aren't adjusting menu items in
your kEventMenuEnableItems and kEventCommandUpdateStatus handlers, why do
you even install them?

- Exactly when do you call the code that adjust menu items? Does it update
all items at once, entire menus at once, or do you call it for each item?
How does that work?

- Regarding the arbitrary binding of keys to actions which aren't on menus,
note that you can insert a menu with InsertMenu( menu, -1 ); and it will
never be seen, but it will still be treated like any other menu for purposes
of menu key matching. So you could have such a menu in which each item
corresponds to a script to which the user has assigned a key combination,
and the item would have a command and a menu key associated with it.
>
>> 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?
>
> We're not using them. We've got these stub handlers for
> kEventMenuEnableItems and kEventCommandUpdateStatus installed on the
> application that just return noErr.


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: 
 >Re: 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.