writestring

omoba

Active Member
Licensed User
Longtime User
Hi,

Please I dont understand the error I am getting. App works fine on 2 device and gives error below on another device. Note I have a blank font.txt file already created in the Files folder of my app.

Line of code:
File.WriteString (File.DirRootExternal, "font.txt", Spinner1.SelectedItem)

I am get a /mnt/sdcard/font.txt: open failed:ENOENT (No such file or directory)
 

omoba

Active Member
Licensed User
Longtime User
Thanks,

Got another error using File.ExternalWritable. This is what I am trying to do (I have a font.txt file created in the app Files folder). Basically, I am trying to save the user's font choice and load that choice at start up. font.txt is created with a default value



Sub Activity_Create(FirstTime As Boolean)
Reader.Initialize(File.OpenInput(File.DirAssets, "font.txt"))
font = Reader.ReadLine
End Sub

Sub Button_Click
File.WriteString (File.DirAssets, "font.txt", Spinner1.SelectedItem)
End sub
 
Upvote 0
Top