• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AS 1.5 (OS X PB) bug fixed in 1.5.5?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS 1.5 (OS X PB) bug fixed in 1.5.5?


  • Subject: Re: AS 1.5 (OS X PB) bug fixed in 1.5.5?
  • From: "Donald S. Hall" <email@hidden>
  • Date: Mon, 29 Jan 2001 23:52:51 -0700

Both write statements below give the same (correct) result in AS 1.4.3:

--begin Applescript

set theText to "1234567890"
set fileRef to (open for access file "Test File" with write permission)

write theText to fileRef starting at ((get eof fileRef) + 1) -- R23's way
write theText to fileRef starting at eof -- from Danny Goodman

close access fileRef

--end Applescript

I haven't tried R23's way in AS 1.5. Maybe it will work. However, my other
problem, creating a new file, can't be addressed by anything like this,
unless catching the -40 error and attempting to set the eof to 0 will work.
(As I'm not in OS X PB just now i can't test it.)

Don

>> The version of AS that comes with the OS X PB does not seem to handle file
>> position markers correctly. If you write to a file "starting at eof", the
>> last character previously in the file is overwritten.
>
> Hasn't this always been the case? EOF is the end of the file, ie, the
> last
> character in the file. If you write at the EOF then you're overwriting
> the
> last character. I haven't been using:
>
> write theText to fileRef starting at ((get eof fileRef) + 1)
>
> for nothing!
>
> R23
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
http://www.theboss.net/appsmore
email@hidden


  • Follow-Ups:
    • Re: AS 1.5 (OS X PB) bug fixed in 1.5.5?
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: linimg to moving target with folder actions
  • Next by Date: Any way to delete a busy file?[was: Deleting locked files]
  • Previous by thread: Re: AS 1.5 (OS X PB) bug fixed in 1.5.5?
  • Next by thread: Re: AS 1.5 (OS X PB) bug fixed in 1.5.5?
  • Index(es):
    • Date
    • Thread