Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!caen!ox.com!tbomb!time Newsgroups: comp.sys.mac.programmer Subject: Re: Is this possible with the Resource Manager? Message-ID: <1CE00001.ed5n0r@tbomb.ice.com> Date: 15 Feb 91 15:02:08 GMT Reply-To: time@ice.com Organization: ICE Engineering, Inc. Lines: 47 X-Mailer: uAccess - Mac Release: 1.0.5+ In article <1991Feb15.110116.5508@bootsie.uucp>, olson@bootsie.uucp (Eric K. Olson) writes: > SetResLoad(FALSE); > resHand = GetResource(type, id); > SetResLoad(TRUE); > if (*resHand!=NULL) { /* The resource was loaded */ > DetatchResource(resHand); > onDiskHand = GetResource(type, id); > DetachResource(onDiskHand); > ReattachResource(resHand, type, id); > } > > In article <1991Feb15.110116.5508@bootsie.uucp> you write: > SetResLoad(FALSE); > resHand = GetResource(type, id); > SetResLoad(TRUE); > if (*resHand!=NULL) { /* The resource was loaded */ > DetatchResource(resHand); > onDiskHand = GetResource(type, id); > DetachResource(onDiskHand); > ReattachResource(resHand, type, id); > } How about: SetResLoad(FALSE); resHand = GetResource(type, id); SetResLoad(TRUE); if (*resHand!=NULL) { /* The resource was loaded */ DetatchResource(resHand); onDiskHand = GetResource(type, id); DetachResource(onDiskHand); /* Now move that resource back into place... */ onDiskHand2 = GetResource(type, id); SizeResource(onDiskHand2, GetHandleSize(resHand)); BlockMove(*resHand, *onDiskHand2, GetHandleSize(resHand)); ChangedResource(resHand); } sound right? tim. ------------------------------------------------------------- Tim Endres | time@ice.com ICE Engineering | uupsi!ice.com!time 8840 Main Street | Voice FAX Whitmore Lake MI. 48189 | (313) 449 8288 (313) 449 9208