Xref: utzoo comp.sys.mac.programmer:16849 comp.sys.mac.wanted:770 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!twg.com!lefty From: lefty@twg.com (David N. Schlesinger) Newsgroups: comp.sys.mac.programmer,comp.sys.mac.wanted Subject: Re: Resource type counting in a single file: mission impossible? Message-ID: <7775@gollum.twg.com> Date: 17 Aug 90 20:30:30 GMT References: <6078@jhunix.HCF.JHU.EDU> Sender: news@twg.com Followup-To: comp.sys.mac.programmer Organization: The Wollongong Group Lines: 65 In article <6078@jhunix.HCF.JHU.EDU> hsu_wh@jhunix.HCF.JHU.EDU (William H Hsu) writes: > My goal was to count the > number of resource types in the "currently opened" resource file, > so that the number obtained could be used to loop through all > types in that file. It turned out that CountTypes(), the > function described in the Inside Mac Resource Manager chapter (I > have an ancient copy from the days when it was one volume), > counts all types in ALL open resource files. This presented a > large obstacle, since much of the code I am working on was > developed by others; I couldn't begin to discover where to close > and reopen the "non-current" files. Surely, I thought, there > must be a function that does only the current resource file -- if > only I could get the right set of arguments to GetIndType(), all > would be well. But after placing a call to the Think C support > line, I was told that "nothing in the Tech Notes explains this"! > In fact, only by using OpenRF() and "poking through the > unformatted binary data for several hundred hours" could I > unearth the secrets of what I considered an everyday function > call. What about Count1Types() and Get1IndType()? These should do _exactly_ what you need done! I hope that was the _janitor_ at Symantec that you were talking to! |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| | David N. Schlesinger || "When I have nothing to say, | | The Wollongong Group || my lips are sealed; | | Internet: Lefty@twg.com || say something once, | | DoD #: 0152 || why say it again?" -- David Byrne | |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| I g n o r e t h i s , i t ' s i n e w s f o d d e r . . .