Pivot
  1. Pivot
  2. PIVOT-850

Fail to take input characters other than English in Mac Lion

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.1, 2.0.2, 2.0.3
    • Fix Version/s: 2.5
    • Component/s: wtk, wtk-terra
    • Labels:
    • Environment:
      Mac Lion

      Description

      In Mac Lion, no Chinese and Korean character can appear in TextInput and TextArea thru the input method.

      However, these components can take the character thru copy and paste.

        Issue Links

          Activity

          Hide
          Sandro Martini added a comment -

          Hi Brendan, thanks for your patience and help ... this is a great info.
          So I think it would be better if you could open an issue to Oracle, describing the problem (and maybe add even a link to this issue), probably it's a JRE thing. Note that they need some minimal example (but don't think they accept a Pivot sample) ...
          Put here a link the the related issue at oracle, so maybe we can help.
          Keep us updated.

          Of course in this way you need to update requirements for your application to latest JRE 7, but (generally speaking) it shouldn't be a problem, now that Java 6 is in End-Of-Life (or better, End-Of-Public fix/support).

          Show
          Sandro Martini added a comment - Hi Brendan, thanks for your patience and help ... this is a great info. So I think it would be better if you could open an issue to Oracle, describing the problem (and maybe add even a link to this issue), probably it's a JRE thing. Note that they need some minimal example (but don't think they accept a Pivot sample) ... Put here a link the the related issue at oracle, so maybe we can help. Keep us updated. Of course in this way you need to update requirements for your application to latest JRE 7, but (generally speaking) it shouldn't be a problem, now that Java 6 is in End-Of-Life (or better, End-Of-Public fix/support).
          Hide
          Brendan added a comment - - edited

          I found the applet version seems has no problem with the Asian characters after the latest release, last couple days from Oracle. But somehow, I haven't fully investigated, the standalone program still behavior the same.

          Java 1.7_17 ( The version I mentioned)

          Show
          Brendan added a comment - - edited I found the applet version seems has no problem with the Asian characters after the latest release, last couple days from Oracle. But somehow, I haven't fully investigated, the standalone program still behavior the same. Java 1.7_17 ( The version I mentioned)
          Hide
          Brendan added a comment -

          Standalone still has problem.

          Show
          Brendan added a comment - Standalone still has problem.
          Hide
          Brendan added a comment -

          Asian Characters in Text Area. Seems good.

          Show
          Brendan added a comment - Asian Characters in Text Area. Seems good.
          Hide
          Brendan added a comment -

          Asian character in Text box

          Show
          Brendan added a comment - Asian character in Text box
          Hide
          Sandro Martini added a comment -

          Note: we know Brendan needs this, but the interface is so complicated that we need some more time, but we keep this as High Priority.

          So our idea to move to 2.0.4 and possibly release it in a few time.

          Another idea (but still to verify) could be to abstract hook point for this issue in Pivot, and move outside (apache-extras) a platform-specific implementation of this fix (that's hard for us because of not available platform for example), and maybe later include it in core Pivot.

          Show
          Sandro Martini added a comment - Note: we know Brendan needs this, but the interface is so complicated that we need some more time, but we keep this as High Priority. So our idea to move to 2.0.4 and possibly release it in a few time. Another idea (but still to verify) could be to abstract hook point for this issue in Pivot, and move outside (apache-extras) a platform-specific implementation of this fix (that's hard for us because of not available platform for example), and maybe later include it in core Pivot.
          Hide
          Sandro Martini added a comment -

          After some searches, the problem with Input Method Editors (IME) on OS X looks hard to fix

          See here for an overview:
          http://docs.oracle.com/javase/7/docs/technotes/guides/imf/overview.html
          and this is the event that we must capture:
          http://docs.oracle.com/javase/7/docs/api/java/awt/event/InputMethodEvent
          .html and here is a tutorial on it:
          http://docs.oracle.com/javase/1.5.0/docs/guide/imf/api-tutorial.html

          Show
          Sandro Martini added a comment - After some searches, the problem with Input Method Editors (IME) on OS X looks hard to fix See here for an overview: http://docs.oracle.com/javase/7/docs/technotes/guides/imf/overview.html and this is the event that we must capture: http://docs.oracle.com/javase/7/docs/api/java/awt/event/InputMethodEvent .html and here is a tutorial on it: http://docs.oracle.com/javase/1.5.0/docs/guide/imf/api-tutorial.html
          Hide
          Sandro Martini added a comment -
          Show
          Sandro Martini added a comment - Hi Roger, that's great ... maybe thi comment from Noel ( https://issues.apache.org/jira/browse/PIVOT-850?focusedCommentId=13251417&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13251417 ) could help to identify/fix the issue ?
          Hide
          Roger Whitcomb added a comment -

          I have done some poking around in the Pivot code. It seems like what is happening is that we recognize keys by the keydown event, but the Character Viewer on OSX is sending just a complete character event (not keydown, keyup) and so we completely miss them. Still trying to verify that this is the problem. Then we would have to figure some way of recognizing and accepting the input in this case.

          Show
          Roger Whitcomb added a comment - I have done some poking around in the Pivot code. It seems like what is happening is that we recognize keys by the keydown event, but the Character Viewer on OSX is sending just a complete character event (not keydown, keyup) and so we completely miss them. Still trying to verify that this is the problem. Then we would have to figure some way of recognizing and accepting the input in this case.
          Hide
          Sandro Martini added a comment -

          Hi all, some news on this ?

          Show
          Sandro Martini added a comment - Hi all, some news on this ?
          Hide
          Sandro Martini added a comment -

          Hi Brendan, don't worry I remember that this issue is critical for you, so it has priority for us in 2.0.3 ... but it's a Mac-only issue so only one of us currently can work on it.
          I hope we can tell you some news soon.

          Thank you for your patience.

          Show
          Sandro Martini added a comment - Hi Brendan, don't worry I remember that this issue is critical for you, so it has priority for us in 2.0.3 ... but it's a Mac-only issue so only one of us currently can work on it. I hope we can tell you some news soon. Thank you for your patience.
          Hide
          Brendan added a comment -

          Hi,

          I would like to push the priority of this issue to "Critical" as for Asia Mac user can't run anything in Pivot as no input allowed. It is not like other bugs which they may only experience in some or rare situation. Please consider.

          Show
          Brendan added a comment - Hi, I would like to push the priority of this issue to "Critical" as for Asia Mac user can't run anything in Pivot as no input allowed. It is not like other bugs which they may only experience in some or rare situation. Please consider.
          Hide
          Sandro Martini added a comment -

          Roger has been able to reproduce it both in Lion and in Snow Leopard (it seems).
          Now we need some more time to fix it in the right way, and test deeply.

          Show
          Sandro Martini added a comment - Roger has been able to reproduce it both in Lion and in Snow Leopard (it seems). Now we need some more time to fix it in the right way, and test deeply.
          Hide
          Roger Whitcomb added a comment -

          Currently (with 2.0.1) on Snow Leopard, I can't input anything from the Character Viewer into Pivot text fields. It simply does nothing when clicking the "Insert" button. And not only with Asian characters.... Even punctuation or Latin characters don't work. If I click "Insert" into another application (even the Terminal window) the character inserts. If I then copy the character to OSX clipboard and paste it (using Command-V) into a Pivot text control, the character is displayed. But, direct Insert from the Character Viewer does not work.

          Using Component Explorer (in Safari as an applet), it does not even show any events when I click the "Insert" button...

          It also does not work in my application (running as DesktopApplicationContext).

          Show
          Roger Whitcomb added a comment - Currently (with 2.0.1) on Snow Leopard, I can't input anything from the Character Viewer into Pivot text fields. It simply does nothing when clicking the "Insert" button. And not only with Asian characters.... Even punctuation or Latin characters don't work. If I click "Insert" into another application (even the Terminal window) the character inserts. If I then copy the character to OSX clipboard and paste it (using Command-V) into a Pivot text control, the character is displayed. But, direct Insert from the Character Viewer does not work. Using Component Explorer (in Safari as an applet), it does not even show any events when I click the "Insert" button... It also does not work in my application (running as DesktopApplicationContext).
          Hide
          Roger Whitcomb added a comment -

          I'll take it – I'm working on Mac... Although, I don't have Lion on either machine yet.

          Show
          Roger Whitcomb added a comment - I'll take it – I'm working on Mac... Although, I don't have Lion on either machine yet.
          Hide
          Sandro Martini added a comment -

          Ok, the good news is that it's a Mac-only issue, but the bad news is that someone with a Mac should help us to solve it ... at least with tests because from what I know none of us works on a Mac now.

          Someone interested ?

          Show
          Sandro Martini added a comment - Ok, the good news is that it's a Mac-only issue, but the bad news is that someone with a Mac should help us to solve it ... at least with tests because from what I know none of us works on a Mac now. Someone interested ?
          Hide
          Brendan added a comment -

          Also for the record, I also tested a Java Web Start demo which works in Mac Lion and this is not a Java issue.

          Show
          Brendan added a comment - Also for the record, I also tested a Java Web Start demo which works in Mac Lion and this is not a Java issue.
          Hide
          Brendan added a comment -

          I tested the Chinese Input from Windows which appeared as box. I found that by changing the font, it works. So the problem is only in Mac Lion. And I will test this in 2.0 pivot tomorrow.

          Show
          Brendan added a comment - I tested the Chinese Input from Windows which appeared as box. I found that by changing the font, it works. So the problem is only in Mac Lion. And I will test this in 2.0 pivot tomorrow.
          Hide
          Brendan added a comment -

          Noel, Fantastic! I think your founding make sense and I will have a look the line soon.
          Good on you!

          Show
          Brendan added a comment - Noel, Fantastic! I think your founding make sense and I will have a look the line soon. Good on you!
          Hide
          Noel Grandin added a comment -

          Brendan, if you want to work on this, a good place to start is TerraTextInputSkin, in the keyPressed method, near line 1114.

          Show
          Noel Grandin added a comment - Brendan, if you want to work on this, a good place to start is TerraTextInputSkin, in the keyPressed method, near line 1114.
          Hide
          Noel Grandin added a comment -

          OK, I think I know what is going on.

          The problem is that we are using the keyPressed and keyReleased events, which are pretty low-level.

          We need to be using the keyTyped event for capturing text input, so that we get the keyboard event after it has been processed by the various "Input Method" frameworks.

          Which will be a little tricky, because sometimes we will need to use keyPressed/keyReleased, and sometimes we will need to use keyTyped.

          Show
          Noel Grandin added a comment - OK, I think I know what is going on. The problem is that we are using the keyPressed and keyReleased events, which are pretty low-level. We need to be using the keyTyped event for capturing text input, so that we get the keyboard event after it has been processed by the various "Input Method" frameworks. Which will be a little tricky, because sometimes we will need to use keyPressed/keyReleased, and sometimes we will need to use keyTyped.
          Hide
          Sandro Martini added a comment -

          Hi, Ok now it's clear, you have reason, the issue is a valid bug. So we have to setup some environment (at least on some Windows version) to show it, and fix.

          Another question: in a Label the Chinese text is well shown (should be Ok here) ?

          Last, if you try the Pivot 2.0, do you have the same issue ?
          (I think you should have the same problem, please tell us, it's important).

          Let's update on this, on a fix for 2.0.2 .
          Thanks again.

          Show
          Sandro Martini added a comment - Hi, Ok now it's clear, you have reason, the issue is a valid bug. So we have to setup some environment (at least on some Windows version) to show it, and fix. Another question: in a Label the Chinese text is well shown (should be Ok here) ? Last, if you try the Pivot 2.0, do you have the same issue ? (I think you should have the same problem, please tell us, it's important). Let's update on this, on a fix for 2.0.2 . Thanks again.
          Hide
          Brendan added a comment -

          I didn't make myself clearly. I does able to show chinese character in Pivot as you see my screenshot. But look at the character show in the textInput box which is suppose to show chinese character I pick from the input method bar. This is how chinese enter into an application, which is after key in a character then pick match word from the language shown in arrow 2. But as you see, pivot still take the character from keyboard directly , not from the input bar.

          So the bug still stand as

          Fail to input character other than English

          Do you agree?

          Show
          Brendan added a comment - I didn't make myself clearly. I does able to show chinese character in Pivot as you see my screenshot. But look at the character show in the textInput box which is suppose to show chinese character I pick from the input method bar. This is how chinese enter into an application, which is after key in a character then pick match word from the language shown in arrow 2. But as you see, pivot still take the character from keyboard directly , not from the input bar. So the bug still stand as Fail to input character other than English Do you agree?
          Show
          Sandro Martini added a comment - Some discussion here: http://apache-pivot-users.399431.n3.nabble.com/Fail-to-input-character-other-than-English-td3879619.html
          Hide
          Sandro Martini added a comment -

          Ok, this is a not-issue (even Noel confirmed this).

          But instead of closing it, I think it would be better to add a sample of right usage to display Text (maybe using our usual Label and TextInput etc components) in Chinese and/or in an Asian language.

          For now I'd put this under Tutorials (and if possible adding a section in an existing one), otherwise creating a dedicated one.
          Tell me if you think it would be better instead to have it as a new Demo.

          Note: then Brendan (and others) should help us to test it, with a right Chinese setup both in Windows 7 and Mac OS.

          Show
          Sandro Martini added a comment - Ok, this is a not-issue (even Noel confirmed this). But instead of closing it, I think it would be better to add a sample of right usage to display Text (maybe using our usual Label and TextInput etc components) in Chinese and/or in an Asian language. For now I'd put this under Tutorials (and if possible adding a section in an existing one), otherwise creating a dedicated one. Tell me if you think it would be better instead to have it as a new Demo. Note: then Brendan (and others) should help us to test it, with a right Chinese setup both in Windows 7 and Mac OS.
          Hide
          Noel Grandin added a comment -

          These are both font issues.

          So yes, providing a way for the user to select a different default font would do the job.

          Show
          Noel Grandin added a comment - These are both font issues. So yes, providing a way for the user to select a different default font would do the job.
          Hide
          Sandro Martini added a comment -

          Are we sure that this is similar tothis (solved many time ago):
          https://issues.apache.org/jira/browse/PIVOT-392
          https://issues.apache.org/jira/browse/PIVOT-315
          ?
          In your Window+7+and+Text+Area+to+show+Chinese+Input+as+Box.jpg I see that in a native Mac app you see the right text, but it's using the heiti sc font ... could you try to use it even in your Pivot app ?
          In Mac the problem could be that instead of boxes, it dispaly nothing ...

          And take a look at some our old discussions:
          http://apache-pivot-developers.417237.n3.nabble.com/Small-drawing-problem-with-Chinese-compatible-font-td1558293.html
          where for example Greg say something on this, and a proposed workaround, like providing a style for your apps with a "right" font (able to display all chars you need).

          Roger, you should already solve a problem like this, right ?

          Any comment is welcome.

          Show
          Sandro Martini added a comment - Are we sure that this is similar tothis (solved many time ago): https://issues.apache.org/jira/browse/PIVOT-392 https://issues.apache.org/jira/browse/PIVOT-315 ? In your Window+7+and+Text+Area+to+show+Chinese+Input+as+Box.jpg I see that in a native Mac app you see the right text, but it's using the heiti sc font ... could you try to use it even in your Pivot app ? In Mac the problem could be that instead of boxes, it dispaly nothing ... And take a look at some our old discussions: http://apache-pivot-developers.417237.n3.nabble.com/Small-drawing-problem-with-Chinese-compatible-font-td1558293.html where for example Greg say something on this, and a proposed workaround, like providing a style for your apps with a "right" font (able to display all chars you need). Roger, you should already solve a problem like this, right ? Any comment is welcome.
          Hide
          Sandro Martini added a comment -

          Brendan, with 2.0.0 of Pivot was this working (in the same environment) ?

          Show
          Sandro Martini added a comment - Brendan, with 2.0.0 of Pivot was this working (in the same environment) ?
          Hide
          Sandro Martini added a comment -

          Hi all, who of us (with at least a Mac) can take a look on this ?

          Show
          Sandro Martini added a comment - Hi all, who of us (with at least a Mac) can take a look on this ?

            People

            • Assignee:
              Roger Whitcomb
              Reporter:
              Brendan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development