Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!
"...Sets a label that the program will jump to in case an error will occur in the current sub..."
If the error occurs afterDefaultValues: your program continues with the next line "FileOpen(c1,"Pairs.ini",cWrite)" and propably faces an error again and goes again to DefaultValues:
Yes, I understand that but then what can be wrong?
This is part of a sub, but is the last part of it so, I'm sure that the code is correct in its sintax....
I added the error label after a tryout error wich render the ini file blank because it errored at the table sort as it was all cells empty, so i coded a fail-safe default value ini file creation, and that is what is failling now...
PS. I tryied reducing the defaulvalues to the simples form :
FileOpen(c1,"Pairs.ini",cWrite)
FileClose(c1)
And STILL FAILS
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!
Last edited by Cableguy : 06-28-2007 at 03:51 PM.
Reason: More details added
Remove errorlabel to see the error.
By the way did you check if pairs.ini can't be opened for write because is open by another app or something similar?
The first error to apear is the table sort since the ini file is blank the table doesnt get any values entered...
But now it gets stranger even withou the errorlabel it loops....
I have no other app using the file....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!
I have some good news and some bad news...
The good news:
I now know why it is erroing out and DZT was Right!! the file is being used by another....Process?
The bad news:
WHAT PROCESS???
I made sure to close the conection each time i access the file...
EDIT: I changed the name of the file under the defaultvalues and now the rror descriptions talks about the c1 key being already added to the diccionary. This makes me think that the conection to c1 is still open altough i'm sure , and have double checked, I did close everytime I opened the conection...can this be a BUG????
Edit2: defenetly a conection issue, I changed to c2 and it worked, with another filename...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!
Just a guess!
On of thousands times you run the compiled app, it failed to terminate before closing the file and stayed as an orphan process, locking your file.
But... only your computer's processor knows the truth.
EDIT (about cableguy last EDIT): No it is not a bug. Just an error occured between FileOpen and FileClose and FileClose didn't executed. So the file left opened.
It IS a good practice to CLOSE the conection you are about to use BEFORE openig it...
Just add
FileClose(c1) 'the conection number you'll be using
FileOpen(c1,.........)
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
My Posts helped you? Consider Buying me a Porto Glass!