Please explain exactly what the goal is (what should be achieved):
- Read the text file (appunti.txt) from the assets (at
Screen.Initialize
?). - Save the text in the new file (appunti.txt) in the Private dir.
- ...
- ...
Please explain exactly what the goal is (what should be achieved):
Screen.Initialize
?).my goal is to avoid error on first run
Which text?
Where does the text come from since the text file does not exist on the first run?
textbox text to create file
So this textbox is not empty at the first run (at Screen.Initialize)?
Post a test aia to shorten this conversation.
Okay, if you feel that is the best solution, you should close this topic by pressing the solution button in that post.
I'm beginner, I'm waiting for comments, it's the best for me, but maybe there are some bugs I can not see.
So actually what functions do you want for your app.
And also see this :
http://ai2.appinventor.mit.edu/reference/components/storage.html#File
read/write a textfile
I see you want to create a Note App but use the functions of the text file right?
You are right, but i just want to know if my approach is correct
Try my new Note App project, it might be very helpful :
NoteApp.aia (6.1 KB)
Regards,
Salman Dev
Thank you for your app, but I would like to know if my approach is correct to read, edit and save a text file. I want to learn and not copy others' code
Yes you can do it like that. The Screen1.ErrorOccured
event is only triggered when the app is started for the first time.
Ok, thanks a lot for all your suggestion
yes, I have done that in my project, so my project won't bring up that error again because I didn't put the (Read File) block on (when screen1 open) so the (Read File) block only works when you have saved data.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.