Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: Testing for System 7 Message-ID: <54494@apple.Apple.COM> Date: 1 Jul 91 00:16:25 GMT References: <1991Jun29.040825.12123@ux1.cso.uiuc.edu> <9235@ucdavis.ucdavis.edu> Distribution: na Organization: Apple Computer Inc., Cupertino, CA Lines: 27 In article <9235@ucdavis.ucdavis.edu> lim@iris.ucdavis.edu (Lloyd Lim) writes: >In article <1991Jun29.040825.12123@ux1.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes: >>davids@mondo.engin.umich.edu (David Snearline) writes: >> >>>Except that you would have to check the version of the system to see >>>if _Gestalt exists... :-) >> >>No, no, no. Very bad. Check for the existence of the _Gestalt trap >>by looking to see if it is in the trap table using NGetTrapAddress. You >>*never* need to look at the version number of the operating system. > >Careful. Never is a strong word. You're correct about checking for Gestalt >(BTW, there's a new version of TrapAvailable in IM VI for those who don't >already know). I don't think that Pete is right with the part about checking for the _Gestalt trap. Gestalt is a library routine. If you can successfully link an application that calls Gestalt, then you are OK. The Gestalt library routine in turn calls the _Gestalt trap, but it checks for the existance of that trap itself; you don't have to. -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "But where the senses fail us, reason must step in." - Galileo