2 Replies Latest reply on Sep 2, 2009 3:34 AM by sathiyabala

    Hai Shardul Singh Bartwal i am getting this error

    sathiyabala

      Hai Shardul Singh Bartwal

       

       

                     Thank u For your reply ,

       

                     I am getting this error while starting the application, i am not able to see the page

       

                       ERROR :

       

                                 Can't move focus to the control because it is invisible, not enabled, ot of a type that does not accept the focus

       

       

       

       

      Can u reply me for this pl

        • 1. Re: Hai Shardul Singh Bartwal i am getting this error
          Andrew Rosewarn Level 3

          Is the controls visible or enabled propery set to false when the app starts and what type of control is it?

           

          Andrew

          • 2. Re: Hai Shardul Singh Bartwal i am getting this error
            Andrew Rosewarn Level 3

            I've just done a test on this and it sets focus even when visible or enabled is set to false

             

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
                <mx:Script>
                    <![CDATA[
                        import mx.controls.Alert;
                       
                        private function keyHandler(event:KeyboardEvent):void {
                            if (event.keyCode == Keyboard.BACKSPACE) {
                                Alert.show('detect')
                            }
                        }
                    ]]>
                </mx:Script>
                <mx:Button x="175" y="147" label="Focus" click="{text1.setFocus()}"/>
                <mx:TextInput x="264" y="147" id="text1"/>
                <mx:TextInput x="264" y="189" id="text2"/>
                <mx:Button x="175" y="189" label="Focus" click="text2.setFocus()"/>
               
            </mx:Application>

             

            So, is your component that requires focus one that is not able to receive focus.  I take it it is instansiated and on the stage?

             

            Andrew