Well, it doesn't seem to work. It simply work erratically. I've followed Lee's sugestion and I have placed status instructions all over the place. This is how the code looks now.
on writeToFile fPath, fName, fData if objectP(gFileObject) then set gFileObject = 0 --Deletes the instance if it already exists set gFileObject = new(xtra "fileio") openFile( gFileObject, fPath & fName,0) -- Opens the file with R/W access delete (gFileObject) filestatus = status(gFileObject) textStatus=error(gFileObject, filestatus) closeFile (gFileObject) filestatus = status(gFileObject) textStatus=error(gFileObject, filestatus) set gFileObject = 0 -- Disposes of the instance set gFileObject = new(xtra "fileio") createFile( gFileObject, fPath & fName) filestatus = status(gFileObject) textStatus=error(gFileObject, filestatus) -- HERE IT HAPPENS openFile(gFileObject, fPath & fName, 0) filestatus = status(gFileObject) textStatus=error(gFileObject, filestatus) writeString( gFileObject, fData) filestatus = status(gFileObject) textStatus=error(gFileObject, filestatus) closeFile (gFileObject) filestatus = status(gFileObject) textStatus=error(gFileObject, filestatus) set gFileObject = 0 -- Disposes of the instance end I have added a comment to one of the lines, the HERE IT HAPPENS comment. When the file is not created I get an I/O Error message for the createFile instructions. Any ideas of what might be happening? Enrique ----- Original Message ----- From: "Enrique Nivasch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 01, 2003 8:52 PM Subject: Re: <lingo-l> Erratic behavior with fileIO xtra > It works, > > Thanks [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
