2022-12-15 03: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.
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
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
2022-12-19 02:13 AM
It is possible to save these arrays in model?
2022-12-19 02:22 AM
Save it where?
FLASH, BKPRAM, SDCARD, permanently?
2022-12-19 02: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.
2022-12-19 04: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