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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 7
Registered: ‎06-03-2013
My Device: Z10LE
My Carrier: Rogers
Accepted Solution

Cascades Dev: Creating an Empty NotePad-esque page

So here's my dillema:

 

I'm in the process of creating an app for an independent Grocery Store i used to work for in HighSchool. One of the requests is to create a "Shopping List" aspect to the app. I've been reading up on the API's and the Forums but cannot find a viable solution for what i'm trying to accomplish. 

 

If anyone has some suggestions or could point me in the right direction that would be Greatly appreciated.

 

Also I'd like for it to Store the text file so that it may be reopened upon app closure.

 

Thanks in advance

 

 

Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Cascades Dev: Creating an Empty NotePad-esque page

welcome to the forums.

A TextArea would be the easiest component for a simple text view/edit.

I would suggest a ListView for the items, with a simple tap to mark something as done.
It would be great to have a simple txt file as a backend for the data and share that via DropBox or similar. I hate editing lists on the phone when i can do that on my PC instead.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 7
Registered: ‎06-03-2013
My Device: Z10LE
My Carrier: Rogers

Re: Cascades Dev: Creating an Empty NotePad-esque page

I can see how the TextArea would accomplish what i need but is there a way to Write to a .txt file and read it back upon page load? 

Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Cascades Dev: Creating an Empty NotePad-esque page

Not in Cascades, but in c++/Qt it is quite easy, check the QFile docs.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 40
Registered: ‎05-14-2013
My Device: Z10
My Carrier: none

Re: Cascades Dev: Creating an Empty NotePad-esque page

I personally use the todo app (called remember) for my shopping list, which works quite nicely.

Highlighted
New Contributor
Posts: 7
Registered: ‎06-03-2013
My Device: Z10LE
My Carrier: Rogers

Re: Cascades Dev: Creating an Empty NotePad-esque page

i know how to implement it into c++ but is there a way to write the saving code in c++ while still having the UI in qml? I'm fairly familiar with c++ and know how to implement it outside of the QDE using a forms application but im not entirely sure on how the QML interacts with it

Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Cascades Dev: Creating an Empty NotePad-esque page

yes, this is entirely possible and i prefer this approach myself.

see https://developer.blackberry.com/cascades/documentation/dev/integrating_cpp_qml/
to learn how to communicate between both parts.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 7
Registered: ‎06-03-2013
My Device: Z10LE
My Carrier: Rogers

Re: Cascades Dev: Creating an Empty NotePad-esque page

Thanks!