i would be very glad if somebody help me about my problem. I'm writin an app in Livecode, and so far everything working fine.
Now i want to save the data a user created in "documents" on the users phone.
I have 5, but probably there are going to be 8 fields with different data. I wanted to safe it to a text file, so the user can upload the data into the app again if he needs this profile.
the field at the bottom is the fileName field.
I attached a screenshot of my app so far.
If the users clicks on "speichern" then it has to save the data from the fields into a variable. My thought was to save the data in 5 lines, so when I'm uploading i can just read from line to line into the fields.
Here´s my code I've written so far:
Code: Select all
on hiliteChanged if auswahl = "speichern" then open file specialFolderPath("documents") & "/" & field "fileName" for write put field "kapm" into line 2 of tData put field "hauptmm" into line 3 of tData put field "schlagm" into line 4 of tData put field "schlagmm" into line 5 of tData write tData to file specialFolderPath("documents") & "/" & field "fileName" close file specialFolderPath("desktop") & "/" & field "fileName" end if end hiliteChanged
I tried this code, but it does not work.