Patch to add input method support

12 views
Skip to first unread message

Kder

unread,
Jun 10, 2010, 3:01:59 AM6/10/10
to microemulator-developers
I found that I couldn't input Chinese in MicroEmulator so I wrote a
patch for

microemulator-3.0.0-SNAPSHOT/microemu-javase-swing/src/main/java/org/
microemu/app/ui/swing/SwingDeviceComponent.java

to add input method support so that users can type complex
characters,such as Chinese,Japanese or Korean, into the textfield in
MicroEmulator. I tested my patch with Chinese input method and it
worked well.

This is the patch file:
http://groups.google.com/group/microemulator-developers/web/InputSupportPatch.diff

Hope this helpful.

Kder

Bartek Teodorczyk

unread,
Jun 10, 2010, 4:02:33 AM6/10/10
to microemulato...@googlegroups.com
Patch applied, please verify whether it works fine when checking out
the latest verstion from repository.

BR,
Bartek Teodrczyk

> --
> You received this message because you are subscribed to the Google Groups "microemulator-developers" group.
> To post to this group, send email to microemulato...@googlegroups.com.
> To unsubscribe from this group, send email to microemulator-deve...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/microemulator-developers?hl=en.
>
>

Kder

unread,
Jun 14, 2010, 7:40:46 AM6/14/10
to microemulator-developers
Yes, it works like a charm.Now I can input Chinese without problem in
Opera Mini emulated in MicroEmulator.

In addition, it works well in TextBox but doesn't work with TextField
of the demo app "microemu-demo.jar".There should be something needed
to improve.

On 6月10日, 下午4时02分, Bartek Teodorczyk <bar...@gmail.com> wrote:
> Patch applied, please verify whether it works fine when checking out
> the latest verstion from repository.
>
> BR,
> Bartek Teodrczyk
>
>
>
> On Thu, Jun 10, 2010 at 9:01 AM, Kder <kder...@gmail.com> wrote:
> > I found that I couldn't input Chinese in MicroEmulator so I wrote a
> > patch for
>
> > microemulator-3.0.0-SNAPSHOT/microemu-javase-swing/src/main/java/org/
> > microemu/app/ui/swing/SwingDeviceComponent.java
>
> > to add input method support so that users can type complex
> > characters,such as Chinese,Japanese or Korean, into the textfield in
> > MicroEmulator. I tested my patch with Chinese input method and it
> > worked well.
>
> > This is the patch file:
> >http://groups.google.com/group/microemulator-developers/web/InputSupp...

Bartek Teodorczyk

unread,
Jun 14, 2010, 7:43:03 AM6/14/10
to microemulato...@googlegroups.com
That's very good. Thank you for the patch.

BR,
Bartek teodorczyk

2010/6/14 Kder <kde...@gmail.com>:

Kder

unread,
Jun 14, 2010, 12:20:39 PM6/14/10
to microemulator-developers
I'm very glad that I can make a contribution to this project, :)

BTW, I rechecked it and found that the "TextField" problem I mentioned
in last mail is NOT a real problem.There is just a short delay when I
begin to input something to the TextField and it may be due to my old
machine.

Now only one little problem remains: every time I press a key using
Chinese input method, an exception will be thrown.One key,one
exception.It's always the same exception as following:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.awt.im.CompositionArea.updateWindowLocation(Unknown
Source)
at sun.awt.im.CompositionArea.setText(Unknown Source)
at
sun.awt.im.CompositionAreaHandler.inputMethodTextChanged(Unknown Sour
ce)
at
sun.awt.im.CompositionAreaHandler.processInputMethodEvent(Unknown Sou
rce)
at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

But this does not affect inputting or other use.Characters can still
be input correctly.So my patch works.That's a good news :)

I'll submit another patch if I work out the exception or it would be
better if you find the solution.

Best wishes,
Kder

On 6月14日, 下午7时43分, Bartek Teodorczyk <bar...@gmail.com> wrote:
> That's very good. Thank you for the patch.
>
> BR,
> Bartek teodorczyk
>
> 2010/6/14 Kder <kder...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages