What is the best way to save data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-15 3:15 AM
Hello everyone, I want to ask what is the best way to save data. I understand that I need to use Model to save. I am kind a new in c++ programming so maybe there is a way to save data in model structs? Can someone help me?
for example I want to save all these selected text to model:
I'm using functions which goes to presenter and when save to model. But I save this texts one by one and it becomes mess. In my project will be a lot of configuration data and I need to somehow save it.
Solved! Go to Solution.
- Labels:
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-19 12:36 AM
Hello @heyo​ ,
Why not saving all these string values in 2-dimensional Array ? With the first element as your data name and the second as the string you want to save.
/Yoann
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-19 12:36 AM
Hello @heyo​ ,
Why not saving all these string values in 2-dimensional Array ? With the first element as your data name and the second as the string you want to save.
/Yoann
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-19 2:13 AM
It is possible to save these arrays in model?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-19 2:22 AM
Save it where?
FLASH, BKPRAM, SDCARD, permanently?​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-19 2:27 AM
Just in microprocessor RAM. But I understand that I need to store it in model.hpp. Because when I save it I need to depict in other screen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-19 4:52 AM
What do you mean by save exactly @heyo​ ?
One purpose of the model is to interact with the different screens of your application and synchronize variables values, to be sure to populate the different UI with the same values. If you want to use the array I suggered, you simply have to declare an array in the model and send values from the UI through the Presenter to store your string values.
/Yoann
ST Software Developer | TouchGFX
