• 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: Read File Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read File Problems


  • Subject: Re: Read File Problems
  • From: Shane Stanley <email@hidden>
  • Date: Wed, 21 Mar 2001 11:19:19 +1100

On 21/3/01 3:38 AM +1000, Richard 23, email@hidden, wrote:

> Although faded, yellowing and in need of an update, the Scripting
> Additions
> Guide is pretty specific about this (and concurs with Nigel's assessment):
>
> If you specify a reference to a file or an alias, the Read command
> attempts to match the reference with a file previously opened with
> the Open for Access command. If a match is found, it simply reads
> the specified data. If no match is found, the Read command opens
> the file, reads the specified data, then closes the file. The file
> mark for a file opened in this fashion is always at the beginning
> of the file.
>
> If you specify a file reference number previously obtained with
> the Open for Access command, the Read command reads the specified
> data immediately.

It's not quite that simple. The example I was trying to think of before is
this:

set myString to "blah"
set myFile to choose file name
set fileRef to open for access myFile with write permission
write myString to fileRef
close access fileRef
read myFile

OMM that last read fails.

--
Shane Stanley, email@hidden


References: 
 >Re: Read File Problems (From: Richard 23 <email@hidden>)

  • Prev by Date: Error type 10 with stay-open applet (and Netscape 4.08)?
  • Next by Date: Re: FileMaker ARGH!!!!
  • Previous by thread: Re: Read File Problems
  • Next by thread: Re: Read File Problems
  • Index(es):
    • Date
    • Thread