3 Replies Latest reply on May 3, 2009 6:03 PM by Michael Borbor

    Problem with the IME!

    xhdreamlover-VT8xt5

      Why can't i catch the IMEEvent.IME_COMPOSITION event ? any one know?

      Thanks in advance!

        • 1. Re: Problem with the IME!
          xhdreamlover-VT8xt5 Level 1

          <?xml version="1.0"?>
          <!-- validators\PNValidator.mxml -->
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
               creationComplete="_onCreationComplete()"
               xmlns:myns="*">
               <mx:Canvas>
                   <mx:HBox>
                       <mx:Button id="_btn"/>
                       <mx:Button id="_btnCheck" label="Check" click="_onCheck()"/>
                   </mx:HBox>
               </mx:Canvas>
             
              <mx:Script>
                  <![CDATA[
                     
                      private function _onCreationComplete(): void
                      {
                          this.addEventListener(TextEvent.TEXT_INPUT, _onTextInput);
                     
                          System.ime.addEventListener(Event.ACTIVATE, _onIMEActivate);
                          System.ime.addEventListener(IMEEvent.IME_COMPOSITION, _onIMEComp);
                          System.ime.addEventListener(Event.DEACTIVATE, _onIMEDeactivate);
                         
                      }
                     
                      private function _onIMEActivate(event: Event): void
                      {
                      }
                     
                      private function _onIMEDeactivate(event: Event): void
                      {
                      }
                     
                      private function _onIMEComp(event: IMEEvent): void
                      {
                      }


                      private function _onTextInput(event: TextEvent): void
                      {
                      }
                  ]]>
              </mx:Script>
          </mx:Application>

           

          Above is my simple codes. When debugging, i set three breakpoints in function _onIMEActivate, _onIMEDeactivate and _onIMEComp. When i left click the program area in IE to make it focousd,  the control flows to _onIMEActivatthe, and then closely to _onIMEDeactivate, and thus can never catch the IMEEvent.IME_COMPOSITION event.

          • 3. Re: Problem with the IME!
            Michael Borbor Level 4

            Did you read when this event gets dispatch?

            1 person found this helpful