In forum TUTORIAL , subject TEXT FILES ,
EREL give some tutorial on Files
But what happen when the file does not exist ? EREL give no information.
I find that nothing happen at this line of code !
With this code :
in Process Globals
Dim TLIG As List
in Sub Activity_Create
ZDIR = File.DirRootExternal
TLIG = File.ReadList(ZDIR , "FILEXEMP.TXT" )
' at this point , no Error at run time when the TXT file does not exists !
some lines after :
XS = TLIG.Size
' here , I obtain a Java error with this message :
"... Object should first be initialized (List) "
I think that EREL have to modify something in B4A in the ReadList method :
**** Initialize whith ZERO size if file does not exists ***
EREL give some tutorial on Files
But what happen when the file does not exist ? EREL give no information.
I find that nothing happen at this line of code !
With this code :
in Process Globals
Dim TLIG As List
in Sub Activity_Create
ZDIR = File.DirRootExternal
TLIG = File.ReadList(ZDIR , "FILEXEMP.TXT" )
' at this point , no Error at run time when the TXT file does not exists !
some lines after :
XS = TLIG.Size
' here , I obtain a Java error with this message :
"... Object should first be initialized (List) "
I think that EREL have to modify something in B4A in the ReadList method :
**** Initialize whith ZERO size if file does not exists ***