Hello,
The Director MX 2004 Documentation explains "FileIO" function "writeReturn"
as (p.588):
"...inserts a line return in a file..." Moreover, as the docs say it should
be used with none of the arguments. But if you simply use it you'll get an
error saying "Symbol expected". Further more, if you paste this function via
the popup menu from the Scripting Xtras, this method would be pasted with 2
arguments: symbol and platform ones. How do I use this function after all?
In the nature of my question though I wanted to insert a break line in the
resulting .txt output file using FileIO methods.
Here is my code:
-- FileIO
-- absolute file path for the file
filePath = _movie.path & "sample.txt"
-- set the source text
fileTextTotal = ("Total questions answered:") && (totalQuestions)
fileTextCorrect = ("Correct") && (totalCorrect)
fileTextWrong = ("Wrong") && (totalWrong)
totalText = fileTextTotal && fileTextCorrect && fileTextWrong
-- instance of FileIO
fileIO = xtra("FileIO").new()
-- create the file
fileIO.createFile(filePath)
-- open the file in RAM and write the file text
fileIO.openFile(filePath, 0)
-- write info "Total questions" to text to file
fileIO.writeString(totalText)
-- close the file
fileIO.closeFile()
-- dispose of an xtra
fileIO = VOID
Before the "writeString" method I wanted to use the "writeReturn" one.
Please help, thanks
--------------------
Petro O. Bochan, M.A.
Assistant Professor
Dept. of Foreign Languages
College of History
Chernivtsi National University
Ukraine
E-mail: [EMAIL PROTECTED]
Tel (home): +03722 71895
Tel (office): +0372 550646
[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!]