[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenResourceFile problem...bug?



Paul Benson replies...

>In <jmk3.724405703@crux1.cit.cornell.edu> Jay M. Krell writes:
>>I use OpenResourceFile to open it. If I ask for only write access (2), I get
>>error $4E, access not allowed. If I ask for read and write (3), no problem.

>This sounds familiar, now what did I do about it?  Make sure you have the
>"don't load auto-load resources" bit set, this may be a problem.  Other
>than that, it might not be possible to just write, since the system has
>to read in the resource map et al.

Bingo... Opening a resource fork "write-only" is analagous to having a disk be
"write-only"... like a disk's directory, a resoure fork's map must be able to
be read.  One concept that clears a lot of things up is this:  Think of the
resource manager as an operating system, a resource fork as a online volume,
and individual resources within the fork as files... it's an analogy that does
work quite well :)

Marc Wolfgram
AOL: M Wolfgram   GEnie: M.WOLFGRAM2   inet: marc@cxr_rs6000.med.ge.com
There are two ways to write bug-free code and only the third one works!