Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: GetRsrc strange in LSP Message-ID: <32576@apple.Apple.COM> Date: 21 Jun 89 18:30:35 GMT References: <24302@srcsip.UUCP> Distribution: na Organization: Apple Computer Inc, Cupertino, CA Lines: 26 In article <24302@srcsip.UUCP> mnkonar@src.honeywell.com (Murat N. Konar) writes: >I'm having trouble with a WDEF I'm writing in LSP. > >The problem is that I'm trynig to do a GetResource >whenever I enter the WDEF. It works fine for all >WDEF messages except wHit. Then GetResource >returns a nil handle but resError = noErr. (!) > >I suspect this is the LSP environment at work since >it seems to work okay when compiled to an application >and run from the finder. > I don't know why you aren't finding your resource, but the fact that the Resource Manager is returning "noErr" was a deliberate "feature". I honestly don't know why it does this, but the Resource Manager intentionally doesn't set ResError to resNotFound if it can't find the resource on a Get(1)Resource call. To add to the bizarreness of it all, Get(1)NamedResource DOES set ResError. ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions