Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: GetResource in DA's Message-ID: <9338@hoptoad.uucp> Date: 19 Dec 89 01:14:19 GMT References: <14956@eerie.acsu.Buffalo.EDU> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 25 In article <14956@eerie.acsu.Buffalo.EDU> volaski@acsu.buffalo.edu () writes: >I recently posted here regarding a question about using dialogs in DA's, but >got no response! > >Anyway, it appears the problem isn't related to dialogs per se. It appears >that calls to GetResource do not work! This occurs when, first, the DA is >running under SuitCase II, and, two, on an control call to the DA. On an open >call, everything works fine. GetResource simply returns a nil handle. The only thing I can think of is that you must be miscomputing the base-relative id of your resource. If so, then you wouldn't see any resource. All resource IDs for a DA are computed relative to a base address, which changes if you install the resource using Font/DA Mover. If your resource is incorrectly numbered or your calculations are wrong, you won't see the resource you're looking for. Break on GetResource in Macsbug, find out the ID you're really looking for from the stack, then go back into run-time mode and look for the resource with that id (using ResEdit). Computation of owned resource ids is covered on IM I-109-110. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com Feminism that refuses to use the word "patriarchy" is kin to abolitionism that refuses to use the word "slavery".