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
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB
Accepted Solution

BB10 promptInput

I am trying to do auto completion in a class that extends PromptDialog:

 

Firstly, it seems we don't get any KeyboardEvents (e.g. KeyUp).

 

So, I switched to Event.CHANGE:

 

In the Event.CHANGE handler, when I detect the trigger, I'm trying to append some text to PromptDialog.text or PromptDialog.promptInput.text but neither appears in the dialog.

 

Can someone please indicate the proper approach?

 

Regards,

Please use plain text.
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: BB10 promptInput

Solved:

			promptInput.autoCorrect = false;
			promptInput.autoCapitalize = AutoCapitalize.NONE;
			

 

Please use plain text.
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: BB10 promptInput

Using latest SDK 3.2.1 on simulator running 10.2 and on Z10 LE running 10.1:

 

in the Event.CHANGE handler,

   setting text via text += string, or via promptInput.replaceText

 

Although it worked in earlier releases, the prompt input text now doesn't get updated.

 

Any suggestions greatly appreciated.

 

Regards,

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: BB10 promptInput

input.text = input.text + string
?
Please use plain text.
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: BB10 promptInput

nope, no difference...

 

I also tried setting text in the dialog constructor - nothing shows in the prompt input field.

 

Regards,

Please use plain text.
Developer
Developer
mdd
Posts: 225
Registered: ‎01-17-2012
My Device: PB

Re: BB10 promptInput

actually, setting text on initialization works fine - as long as you don't then clear it in the caller fn... doh

 

I suspect that setting the text in the CHANGE handler is messed up because of some other auto magic on the TextInput...

setting spellCheck=false didn't help.

 

Regards,

Please use plain text.