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: <54492@apple.Apple.COM> Date: 1 Jul 91 00:09:49 GMT References: <54449@apple.Apple.COM> <1991Jun29.040825.12123@ux1.cso.uiuc.edu> Distribution: na Organization: Apple Computer Inc., Cupertino, CA Lines: 24 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. > No, no, no. Very bad. Check for the existance of Gestalt by looking at the version number of your development system. Gestalt is _glue_; it's in the libraries of the most recent development systems. You don't have to check for a Gestalt trap. Just call it. If the trap exists, the library routine will call it. If not, then the library routine emulates it as well as it can. -- ------------------------------------------------------------------------------ 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