Hello everybody.
My app has 2 screens
In each of them there are some textbox.
If I write into them and I change screen, when I return on the previous screen the datas are deleted.
How can I save my datas obviously without creating a database?
Using VB, I could save the contents of the box into the property TAG. Is there something like this in AI2?
Thanks
You could always use tinydb component
Thanks for your answer.
The tinydb is a db?
I would not like to use a db, because my app is very simple, it doesn't need to save data from one session to another, but only inside the active session.
If you want to transfer the data from Screen1 to Screen2 you can do this :
Add this one in Screen1
And get the value in Screen2
If you want to transfer the data from Screen2 to Screen1. Check this out :
TinyDb stores data in app so it will be available each time the app is run.
http://ai2.appinventor.mit.edu/reference/components/storage.html#TinyDB
Maybe don't use 2 screens. Make arrangements visible or not on one screens. That would make your app even simpler and you wouldn't need a tinyDB.
Thanks Salman_Dev,
but I don't have to transfer datas from a screen to another.
I have 2 different screens. I close the first and open the second, when I return to the first my datas of the first screen are deleted. I must recover these datas.
Your idea is good, I'll try to do this but the 2 screens are quite different to switch on and off each controls.
If I can't I'll include the tinydb as dora_paz says.
You should place the components for each virtual screen in an vertical or horizontal arrangement and make that visible or not.
but its saving grace is that it does allow a developer to pass a variable from one screen to another without using tinydb or startValue, the OP didn't want to use a database....