Hello,
when i tested my app on the device today, i got an unspecified error message within a sub upon program start.I don't get this error on the desktop emu, so i didn't realize this for a longer time and believed everything is fine.
I installed then the System_SR_ENU.CAB on my device to get a clue what the problem is.
I get now this error:
"Could not find the file \Temp\afilename"
This error occurs while executing:
If i use
later in the code, it properly creates the file without error message using the same path/file, the FileExist doesn't seem to like.
As i already mentinoned, on the desktop no error message at all occurs, even if the file/path does not exist.That is what the check for is..
By testing i found, that the ...FileSize (LogfileName) > 0 statement seems to be the problem.
I assume now:
- FileExist(file) works ok on Desktop and Device
- FileSize(file) is generating an error, if (file) does not exist, on device, but not on desktop.
Can anyone confirm that..? Is this a (know or unknown) bug..?
cheers
TWELVE
when i tested my app on the device today, i got an unspecified error message within a sub upon program start.I don't get this error on the desktop emu, so i didn't realize this for a longer time and believed everything is fine.
I installed then the System_SR_ENU.CAB on my device to get a clue what the problem is.
I get now this error:
"Could not find the file \Temp\afilename"
This error occurs while executing:
B4X:
Sub Globals
...
LogFileName = "\Temp\myfile"
...
End Sub
If FileExist(LogFileName) = true AND FileSize (LogfileName) > 0 = true Then
FileOpen (FileHandle,LogFileName,cRead)
...
Else
MsgBox(LogFileName & " does not exist..!")
End if
...
End Sub
If i use
B4X:
FileOpen(LogFileHandle,LogFileName, cWrite ,cAppend,)
later in the code, it properly creates the file without error message using the same path/file, the FileExist doesn't seem to like.
As i already mentinoned, on the desktop no error message at all occurs, even if the file/path does not exist.That is what the check for is..
By testing i found, that the ...FileSize (LogfileName) > 0 statement seems to be the problem.
I assume now:
- FileExist(file) works ok on Desktop and Device
- FileSize(file) is generating an error, if (file) does not exist, on device, but not on desktop.
Can anyone confirm that..? Is this a (know or unknown) bug..?
cheers
TWELVE