Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!yetti!geac!daveb From: daveb@geac.UUCP (Brown) Newsgroups: comp.sys.mac Subject: Re: multifinder queries & HyperCard annoyances Message-ID: <1365@geac.UUCP> Date: Mon, 14-Sep-87 08:59:00 EDT Article-I.D.: geac.1365 Posted: Mon Sep 14 08:59:00 1987 Date-Received: Tue, 15-Sep-87 00:43:16 EDT References: <809@newton.physics.purdue.edu> <4060@utai.UUCP> <6209@apple.UUCP> Reply-To: daveb@geac.UUCP (Dave Collier-Brown) Organization: The little blue rock next to that twinkly star. Lines: 33 Keywords: HyperCard Summary: Identifying capabilities. In article <6209@apple.UUCP> lsr@apple.UUCP (Larry Rosenstein) writes: >In article <4060@utai.UUCP> dudek@ai.UUCP (Gregory Dudek) writes: >> Does anybody know how you can tell you're running in this environment? >>I presume that the switcher globals are still used, but how do you know > >The question is why do you need to know whether you are running under >Multifinder? Usually, you just want to know if one of the Multifinder >features is available (eg, WaitNextEvent, temporary memory allocation, etc.) >In this case, you just see if the appropriate trap is implemented or not. Well, one may want to know if a group of capabilities are present and give an application global a mnemnonic name... like MultiFinderUsed... For single capabilities, the test is trivial. But can one conveniently infer that capability XXX exists if YYY does? Ie, are later Apple products proper supersets of earlier ones? This is part of the "version problem", and a technique which works well is to have a "Capabilities" variable in the program, containing a named bit for each capability used, and setting it from a set of constants. The constants are generated from a manual survey of capabilities for each version (to date) of an operating system. This in turn implies a means of identifying a version of the operating system. Were I Apple, I might want to provied either a version number or a convenient method of asking for the capabilities vector (ie, a bitmap in the ROM might be nice and cheap). Apple/developers are invited to get details by mail... --dave (note the quote below re the above) c-b -- David Collier-Brown. {mnetor|yetti|utgpu}!geac!daveb Geac Computers International Inc., | Computer Science loses its 350 Steelcase Road,Markham, Ontario, | memory (if not its mind) CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.