Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!husc6!psuvax1!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: touching resource attributes w/o modifying file Keywords: mac resource manager setresattrs getresattrs Message-ID: <2818@carthage.cs.swarthmore.edu> Date: 5 May 89 14:32:06 GMT References: <517@biar.UUCP> Reply-To: jackiw@carthage.UUCP (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 35 In article <517@biar.UUCP> trebor@biar.UUCP (Robert J Woodhead) writes: > I have a couple of sections of code that occasionally need to temporarily > change resource attributes; in particular, resSysHeap. > getresattrs / setresattrs / my code / setresattrs(original) works fine, > but it has the side effect that it changes the file's modification date Hmmm.. are you sure? IM I-113: "* To change the information stored for a resource in the resource map, call SetResInfo or SetResAttrs. If you want the change to be written to the resource file, call Changed Resource." > which I don't really want to do; I want to be as non-invasive as possible. > Therefore, any suggestions on how I can load to the application heap w/o > causing a modification in the file? Might you be calling ChangedResource on your resource at some other point or for some other reason? Just a guess (but it does seem like your exper- ience, as stated, contradicts the Gospel). If not--i. e. if Resource Manager is shafting you--you could consider just patching NewHandle, which GetResource is going to have to call to allocate the resource in the system heap, to mask off the SYSHEAP bit. If so, be sure to localize (install + deinstall) your patch gravely, because of all the unpredictable times the System might want a bite of the Sys Heap for its own reasons. > Robert J Woodhead, Biar Games, Inc. ...!uunet!biar!trebor | trebor@biar.UUCP -- _ _|\____ Nick Jackiw | Visual Geometry Project | Math Department / /_/ O> \ ------------+-------------------------+ Swarthmore College | O> | 215-328-8225| jackiw@cs.swarthmore.edu| Swarthmore PA 19081 \_Guernica_/ ------------+-------------------------+ USA