Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!hellgate.utah.edu!helios.ee.lbl.gov!ux1.lbl.gov!beard From: beard@ux1.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.programmer Subject: Re: Including DLOG and DITL resources with new ID's Summary: Write the DLOG and DITL's in Rez. Message-ID: <4617@helios.ee.lbl.gov> X-Local-Date: 12 Jan 90 16:16:26 PST Date: 13 Jan 90 00:16:26 GMT References: <105612@ti-csl.csc.ti.com> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux1.lbl.gov (Patrick C Beard) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 30 In article <105612@ti-csl.csc.ti.com> leeke@m2.csc.ti.com (Steve Leeke) writes: #I would like to be able to include some resources from a number of #other files into the final resource file for my program, changing the #included resources' IDs in the process. I'm using Rez so this is #pretty easy. I'm using: # #include "foo" 'DITL' (128:999) as 'DITL' (ResourceOffset + $$ID); #include "foo" 'DLOG' (128:999) AS 'DLOG' (ResourceOffset + $$ID); # #The problem arises in the DLOG resources since they also include a #reference to the DITL to use - whose resource ID just changed. Since #the ResourceOffset will change over time I'd like to figure out an #automated way to update the DLOG resource using MPW tools and scripts. # #Any ideas? # This might seem obvious, but it seems to me that this is a perfect candidate for a resource that you should implement in the Rez language itself. Then you can specify in the text of the Rez source file how the DLOG's and DITL's relate. The best place to start would be to DeRez your resource files and add the symbolic constants. You could still keep them as separate files if you like, and use the #include directive instead. ------------------------------------------------------------------------------- - Patrick Beard, Macintosh Programmer (beard@lbl.gov) - - Berkeley Systems, Inc. "..............Good day!" - Paul Harvey - -------------------------------------------------------------------------------