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: Set max chars for Unicode Edit Text control?



On 7/26/04 7:38 PM, Manfred Schubert didst favor us with:

> Am 26.07.2004 um 10:06 schrieb Laurence Harris:
>
>> You should have something like this:
>>
>> UInt32 dataSize;
>> OSStatus err = GetEventParameter( inEvent,
>> kEventParamTextInputSendText, typeUnicodeText, NULL, 0, &dataSize,
>> NULL );
>
> This always returns 2 for the dataSize, no matter how long the Japanese
> text that is entered is.

How is it being entered? Is this handler only being called once even though
multiple characters are being entered?

> So this does not help me to determine how much
> text there will be in the edit text control from within the
> kEventTextInputUnicodeForKeyEvent handler.

There's another event, kEventTextInputUpdateActiveInputArea, which I've
seen in some snippets of sample code, but I haven't used it yet myself.

As someone else said (or sort of said), this is kind of a mess at this
point. Virtually everyone who tries to deal with this robustly gets
frustrated because there really is no elegant solution yet. If you find it
too much of a challenge to get the Unicode-savvy filtering working working
with all kinds of input (and that's no reflection on your abilities--it
really is a mess), go ahead and use the key filtering. Then if a problem
comes up, you can look into more advanced techniques.

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: Set max chars for Unicode Edit Text control? (From: Manfred Schubert <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.