Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!apple!Apple.COM!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: What is OpenRFPerm doing?!? Message-ID: <1542@internal.Apple.COM> Date: 26 Apr 89 02:20:37 GMT Sender: usenet@Apple.COM Organization: Objects-R-Us, Apple Computer, Inc. Lines: 39 References:<1146@uvm-gen.UUCP> <7017@hoptoad.uucp> <1152@uvm-gen.UUCP> <7087@hoptoad.uucp> In article <7087@hoptoad.uucp> tim@hoptoad.uucp (Tim Maroney) writes: > >1) ResEdit opens these files (there are two) fine, and the FKEYs within > > them work fine when installed into the system. What can be special > > about them? > > I don't know how much special checking ResEdit does. (Jon?) If I > wonder about the correctness of a file, I go into MPW and run the > RezDet tool on it. This picks up and reports on a wide variety of > resource file problems. ResEdit bypasses the Resource Manager and > handles the resource file format directly, so it is possible that ResEdit does use the Resource Manager. (It may do some additional checking, I don't know.) I broke in Macsbug on OpenResFile and Get1Resource, and ResEdit called both of them. One thing ResEdit does do is control which resource file is current, etc. As Tim said, this is VERY important if your program opens arbitrary resource files. For example, suppose you open an application, and try to call a procedure in a different segment. Unless you are careful, you will get the segment out of the data file, and not your application. Now the report above says that ResEdit can not only open the problem resource files, but also can manipulate the resources contained within. This would seem to rule out the explanation that the resource files were corrupted. In that case, I would look at the possibility that the resource files contain some resources that are conflicting with the application. They might be CODE resources, DLOG, etc. Also, look and see if the problem resource fils have any resources marked preload. Larry Rosenstein, Apple Computer, Inc. Object Specialist Internet: lsr@Apple.com UUCP: {nsc, sun}!apple!lsr AppleLink: Rosenstein1