Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!inebriae!al From: al@inebriae.UUCP (Al Evans) Newsgroups: comp.sys.mac.programmer Subject: Re: Purge or Revert Resource? Message-ID: <375@inebriae.UUCP> Date: 26 Jun 89 13:39:53 GMT References: <82203@ti-csl.csc.ti.com> Reply-To: al@inebriae.UUCP (Al Evans) Organization: PowerTools Lines: 19 In article <82203@ti-csl.csc.ti.com> holland@m2.csc.ti.com (Fred Hollander) writes: >I want to revert a resource that is already loaded into memory by >reading the resource from the resource file and discarding any >changes. I also want to keep the same handle to the resource. Can >this be done? LoadResource won't do anything if it's already loaded. >I can't find a PurgeResource procedure. Is there any way to force a >resource to be purged or to force a resource to be reloaded? I can't, offhand, think of any real clean way to do this and keep the same handle. Probably, you should be making "provisional" changes on a COPY of the original resource, anyway. That way you'd have your OWN handle, you could revert at will, and only if you wanted to KEEP the changes would you copy the resource back to the RM's handle and call ChangedResource on it. --Al Evans-- -- Al Evans {tndev,texbell,ssbn}!inebriae!al al@inebriae.WLK.COM