Friday, April 2, 2010

Hai Shardul Singh Bartwal i am getting...

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

Hai Shardul Singh Bartwal i am getting...

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

Andrew

Hai Shardul Singh Bartwal i am getting...

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

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

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

  • facebook.com
  • No comments:

    Post a Comment