PROBLEMS WITH WRITE TO FILE

Stephen Barncard stephenIC at barncard.com
Tue May 20 06:31:01 EDT 2003


Ok, thanks very much....

Delete first was not needed in OS9 in Hypercard -- a 'write to file' 
was an explicit overwrite, no delete needed. The ability to write 
anywhere in the file was there in HC 2.3 with additional parameters 
in the write command. Again, this info was not clear in the 
Transcript guide.

Not knowing this has wasted about 3 days for me... BIG difference from HC.

Is this a UNIX  or REV 'feature'?

sqb

>
>If your intent is to put 100% new data into a file you MUST first delete the
>file:
>
>delete file filePath
>
>open file filePath
>write myData to file filePath
>close file filePath
>
>
>However, the problem you encountered is a *feature* for those of us who may
>want to write to the file at a specific place, appending new data somewhere,
>for example the end of the file using:
>
>open file filePath
>write myNewData to file filePath at end
>close file filePath
>
>>On 5/19/03 2:12 PM, "Stephen Barncard" <stephenREVOLUTION at barncard.com>
>>wrote:
>>
>>  > 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,
>



More information about the use-livecode mailing list