I create text.txt in B4A's Files Panel.(Ofcause it live in File.DirAssets ,Cann't change) then In Sub Activity_Create(FirstTime As Boolean) ,I wrote this code:
If File.Exists(File.DirDefaultExternal,"text1.txt")=False Then
File.Copy(File.DirAssets,"text.txt",File.DirDefaultExternal,"text1.txt")
End If
I sure that my widget must use text1.txt for change data.
I use Spinner for keep data for text1.txt before and then press the button to call new activity for add new data and save into text1.txt again. Ofcause I use your hints about CRLF this code Writer.WriteLine(CRLF &TxtRRName.Text & "," & TxtUUPrice.Text ) ,it 's smooth .After I add new data via press the button again, it has error occured about "String IndexOut of Bounds" I think that why does my widget still use text.txt ?
Why not save text1.txt whenever I call my widget?
Best Regards
Theera
:sign0163:
If File.Exists(File.DirDefaultExternal,"text1.txt")=False Then
File.Copy(File.DirAssets,"text.txt",File.DirDefaultExternal,"text1.txt")
End If
I sure that my widget must use text1.txt for change data.
I use Spinner for keep data for text1.txt before and then press the button to call new activity for add new data and save into text1.txt again. Ofcause I use your hints about CRLF this code Writer.WriteLine(CRLF &TxtRRName.Text & "," & TxtUUPrice.Text ) ,it 's smooth .After I add new data via press the button again, it has error occured about "String IndexOut of Bounds" I think that why does my widget still use text.txt ?
Why not save text1.txt whenever I call my widget?
Best Regards
Theera
:sign0163: