![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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: Code:
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 Code:
FileOpen(LogFileHandle,LogFileName, cWrite ,cAppend,) 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 |
|
||||
|
y tadd the ApPahkeywo in he file path...
something like... LogFileName = AppPath & "\Temp\myfile" You may be looking for the file in the wrong folder....
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
|||
|
Quote:
Quote:
difficulty thingy..:-) Last edited by TWELVE : 05-10-2008 at 02:38 AM. |
|
|||
|
The error occurs if the file does not exist, but only on device, as outlined above.
I do it now this way: Code:
If FileExist(LogFileName) = true Then If FileSize (LogfileName) > 0 = true Then I found also some other differences between desktop and device ( sizing of gui elements/controls, font to large for a button, Tabcontrol not visible if the assigned form is too large in size...), which makes development a bit difficult. I cannot trust on the desktop and need to test the app on the device before i give that out to someone else. regards TWELVE |
|
||||
|
Quote:
Which means that if the file doesn't exist, its size will not be checked. Due to the syntax error the conditions were not checked correctly. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Web browser for desktop and device | agraham | Additional Libraries | 49 | 11-23-2008 06:12 PM |
| Device or Desktop | DaveW | Questions & Help Needed | 2 | 11-07-2008 01:04 PM |
| Device Error: file/assembly not found | Dave Mitchell | Questions & Help Needed | 6 | 05-09-2008 12:30 AM |
| Different behaviour DeskTop and Device | HARRY | Questions & Help Needed | 2 | 02-22-2008 01:36 PM |
| Using rapi from desktop to copy file from device to desktop | sunnyboyj | Questions & Help Needed | 9 | 02-08-2008 12:40 PM |