Some time ago our application switched from using a home grown
implementation of alert dialogs to using
CreateStandardAlert plus RunStandardAlert.
In the process we lost a feature.
Formerly one could select a button by typing
the first character of it's name,
that is if the buttons were named
"No" "Cancel" "Yes"
then typing the character n would act as a click in the "No" button,
c the "Cancel" button etc.
Typing escape, return, or enter worked as expected.
With the change, typing escape, return, or enter still
work as expected, but I am having a problem handling
the typing of other characters. Some users have
requested that the ability to type e.g. n to choose the
"No" button be reinstated.
It seems as if calling RunStandardAlert with
a filterproc created with NewModalFilterUPP should be
helpful in doing so.
However when the filterproc is called and I do
GetEventClass and GetEventKind of the event,
the class is nonsense (corresponds to no known
event class and varies) and the kind is always 0.
I would have expected to find kEventClassKeyboard
and kEventRawKeyDown when a character is typed.
Never happens.
Also when the filterproc is used, typing escape return or enter
cease to function.
So either:
a) I doing something wrong
b) I shouldn't expect this approach to work
c) There another way to handle keystrokes in StandardAlert
d) its not possible
Any help appreciated.
Thanks,
_______________________________________________
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