home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!wupost!waikato.ac.nz!canterbury.ac.nz!cantva!clas005
- Newsgroups: comp.sys.mac.hypercard
- Subject: Re: Open and close files in HC 2.0
- Message-ID: <1992Nov20.145522.1@csc.canterbury.ac.nz>
- From: clas005@csc.canterbury.ac.nz
- Date: Fri, 20 Nov 1992 01:55:22 GMT
- References: <1992Nov19.142547.27732@motor.physiolmotor.physiol>
- Organization: University of Canterbury, Christchurch, New Zealand
- Nntp-Posting-Host: cantva.canterbury.ac.nz
- Lines: 24
-
- In article <1992Nov19.142547.27732@motor.physiolmotor.physiol>,
- ph@physiology.oxford.ac.uk (Patrick Haggard) writes:
- >
- > Hi. I'm writing a stack in which I open a file in one card, and then
- > write some ASCII strings to it from some subsequent cards, then close
- > it. Trouble is, HC 2.0 seems to close the file every time it gets a
- > closeCard message, so my subsequent attempts to write to it say it
- > isn't open. I don't remember this in HC1.2. Is this some
- > undocumented feature? To get round it, I must either prevent the
- > closeCard message from closing the file, or else close the file each
- > time, and then reopen it. The latter option would be fine if I could
- > open it with status append, or fseek the end of file after opening it.
- > Any ideas about how to implement either solution would be *most*
- > welcome.
-
- First, you do not need to close the card to you are on in order
- to fetch data from other cards; you can be on card 1 and say
- "write bg fld 1 of cd 2 to file MyFileName".
-
- Second, in HC 2.1 (not 2.0), you can append; you say, "write
- ThisStuff to file MyFileName at EOF".
-
- Third, I dunno why your file is being closed, sorry. Good luck!
- -- matt
-