PROBLEMS WITH WRITE TO FILE
Stephen Barncard
stephenREVOLUTION at barncard.com
Mon May 19 11:23:02 EDT 2003
I don't know if it's OSX or a bug in REV, but I'm having a hell of a
time with the simple WRITE TO FILE command.
Instead of overwriting the old file, it always appends at leaves
garbage of the old data at the end of the file, yet I am clearly
using the command as I always did in Hypercard...this garbage is
deadly to a html file....
Must I delete the file entirely before 'overwriting'? This seems
strange and unneeded. Is there a better syntax? This is not explained
well in the Transcript guide, especially the "start at" parameter. Is
it "at" or "start at" ?.
function writeToFile theBlock
global targetFile
set the fileType to "MSIETEXT"
open file targetFile
write theBlock to file targetFile at 0
close file targetFile
end writeToFile
More information about the use-livecode
mailing list