[WASTE-list] WESetEventTarget

Alfred Van Hoek vanhoek at mac.com
Fri Dec 9 20:58:10 EST 2005


WEKey is deprecated and we require to use WESetEventTarget to take
advantage of Unicode. The documentation says: "instead of feeding raw
keyboard events to WEKey, you should install text input event
handlers".

Does it mean we should provide something like:

#if (WASTE_VERSION >= 0x03000000)
pascal OSStatus
My_DispatcherHandler
(EventHandlerCallRef inCaller,
EventRef inEvent,
void* inRefcon)
{
// and Waste extracts the rawkeyEvent, we don't need to do here
anything
// it appears to work for a U.S. encoding, but not for Arabic-QWERTY
(it types
// but it is all squares
}
#endif


for completeness we call the following in our Initializer:

#if (WASTE_VERSION >= 0x03000000)
{
static EventTypeSpec kTextInputEvent[] = {

{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent },
};
InstallEventHandler(GetEventDispatcherTarget(),
NewEventHandlerUPP(My_DispatcherHandler),
GetEventTypeCount(kTextInputEvent),
kTextInputEvent, NULL, NULL);
WESetEventTarget(GetEventDispatcherTarget(), weTextInputEvents,
(WEReference)data->text);
}
#endif

And it also appears that under these conditions (in above context, and
to be expected) that there isn't much control to filter text.

We liked WEKey, and would liked to have seen us to send the
textEncoding, the UniChar etc. Wouldn't this be better then letting
Waste dispatching the event? Is Waste dispatching it?

Any clues how we should address the problem?

Alfred



More information about the WASTE-list mailing list