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
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: 16,679
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: 16,679
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.

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: 16,679
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!