Re: Scripting Additions 'Read' has stopped reaching EOF?
Re: Scripting Additions 'Read' has stopped reaching EOF?
- Subject: Re: Scripting Additions 'Read' has stopped reaching EOF?
- From: Nigel Garvey <email@hidden>
- Date: Mon, 26 Jan 2004 21:08:03 +0000
Chap Harrison wrote on Sun, 25 Jan 2004 17:07:48 -0600:
>
Now, it reads okay up through the final record. On the next read,
>
instead of entering the 'on error' block indicating it's hit EOF, it
>
continues to return a portion of the final record!!
Chap Harrison wrote on Mon, 26 Jan 2004 08:06:10 -0600:
>
Identical data in an identically-named file, for sure. (It gets freshly
>
re-created each time I run the script.)
Does "freshly recreated" mean "a brand new file with a different name" or
"a rewrite of the old file"? If the latter, does the saving routine set
the file's eof to 0 before writing new data to the file? Your symptoms
might arise if you were writing shorter data to an existing file, because
the end of the old data would still be there beyond the end of the new.
By zeroing the eof first, you effectively "delete" any existing data and
the end of the file will then come at the end of the new data.
NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.