Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

Re: Constant User Error Reports since 10.2

[ Edited ]

I can also reproduce this by simply setting stage.focus to the TextField:

var text:TextField = new TextField();
text.type = TextFieldType.INPUT;
addChild(text);
stage.focus = text;  //APP CRASHES HERE Smiley Sad

 

 

Developer
Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

Re: Constant User Error Reports since 10.2

[ Edited ]

This seems to require several workarounds, I've put it into a class here:
http://supportforums.blackberry.com/t5/Adobe-AIR-Development/BB10TextFix-as-Fixes-TextField-Issues-i...

 

 

 

 

 

New Developer
Posts: 38
Registered: ‎01-07-2011
My Device: Not Specified

Re: Constant User Error Reports since 10.2

Thanks for identify and resolving the problem.

 

I found this prevents the crash when setting focus:

 

var tf : Textfield = new Textfield();

...

tf.text = " ";
tf.setSelection(tf.length, tf.length);  // set cursor at end of text (after the space)

stage.focus = tf;

 

The text field cursor somehow causes the crash when it's at position 0.