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

Native Development

Reply
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA
Accepted Solution

Get value of a text field in a prompt box?

SystemPrompt *prompt = new SystemPrompt();
//SET ADDITIONAL PROMPT SETTINGS

//LATER IN THE APP
myTitle = prompt->inputField->?????

 How can I get the text that a user has inputted in to my prompt?

 

I have tried:

 

myTitle = prompt->inputField()->defaultText();

 But no luck.

 

This is in C++.

 

Thanks

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Get value of a text field in a prompt box?

I have to admit to have been mostly avoiding the c++ but have you tried

myTitle = prompt->inputField()->text;

 


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 293
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

Re: Get value of a text field in a prompt box?

[ Edited ]

You can use the SystemPrompt::inputFieldTextEntry() member function


I only used it in QML so far, but I guess in C++ you would use:

 

prompt->inputFieldTextEntry()

 

Highlighted
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Thanks

Thanks

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone