I'm trying to implement reading a txt document. I have found the sample code and modified the Filename to filename I have. When compiling - no errors, but when I try to open this file I get "File Not Found' ERROR!
I added the file to the File in IDE, but it still doesn't work
This "Main.DBFileDir" is defined in Main module, so the path should be available everywhere. When I'm reading the path right before Initialize() it shows wired location (see attachment). Is this where the file should reside ?
------------------------------------------------------------------------
any ideas what is wrong here ?
Arthur
I added the file to the File in IDE, but it still doesn't work
This "Main.DBFileDir" is defined in Main module, so the path should be available everywhere. When I'm reading the path right before Initialize() it shows wired location (see attachment). Is this where the file should reside ?
------------------------------------------------------------------------
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.LoadLayout("Intro")
Reader.Initialize(File.OpenInput(Main.DBFileDir, "edb_intro.txt"))
Line = Reader.ReadLine
Do While Line<>Null
Log(Line)
Line = Reader.ReadLine
Loop
Reader.Close
End Sub
Arthur
Attachments
Last edited: