mac vm 3.7.1b1 (testing)

John M McIntosh johnmci at smalltalkconsulting.com
Fri Dec 19 00:04:22 UTC 2003


On Dec 18, 2003, at 3:20 PM, Yoshiki Ohshima wrote:

>
>   Let me see if I understand this...  Before the change, the code in
> the EventKeyDown/Up event is different from the EventKeyChar and
> *after* the change, the code in the three events are the same?

Yes

>
>   When the VM is running with an older image, the right thing for à
> (224 in latin1/unicode, 136 in macroman) is to generate:
>
>> EventKeyDown
>> charCode = 136
>> EventKeyChar
>> charCode = 136
>> EventKeyUp
>> charCode = 136
>
>   right?

No, its
EventKeyDown
charCode = 224
EventKeyChar
charCode = 136
EventKeyUp
charCode = 224

which is what pre 3.7.0.bx VMs would generate.


>
>   Too bad I don't have any Mac available around me.  (Probably I
> should try tomorrow at the Glendale office.)
>
>   I thought you added a primitive to change the encoding?  The default
> behavior of VM should be compatible with the older image.

  I didn't add a primitive, I think you are thinking of the encoding for  
file names, path names, and vm path which is
set as a plist parm so it's correct as the application starts up.

>
>   Speaking of:
>
>> Also for multiple character input we generate
>> EventKeyDown,EventKeyChar,EventKeyChar ... {repeats}, EventKeyUp
>>
>> which I believe is technically wrong
>
>   Probably it is, but I can imagine it is easier to be handled by a
> variant of the KeyboardInterpreter plugged into the HandMorph, because
> it can see that the code it is seeing is a part of multibyte character
> or not.  But it should be able to handle this without (too much)
> confusion.

Multibyte character in this case means getting a unicode string from  
the input
manager as a result of using the input text method which results in a  
keyboard event which has
more than one character as a result. Before 3.7.0 I would only grab the  
first character, in 3.7.0b1-b3
I would process 1 or more characters as a EventKeyChar event.

>
>> For multi-byte character input you get
>> EventKeyDown/EventKeyChar/EventKeyUp for each unicode character coming
>> from the input sequence.
>
>   Do you mean by 'for each unicode character' that the bytes of
> UTF-8? or single UTF-32/16 value?

We get back a string of typedef UInt16                          UniChar;
I'd guess that is 16 bits UTF-16?

>
>   Thank you so much!
>
> -- Yoshiki
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list