Xref: utzoo comp.sys.mac.programmer:5417 comp.sys.mac:29654 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!goldman@apple.com From: goldman@apple.com (Phil Goldman) Newsgroups: comp.sys.mac.programmer,comp.sys.mac Subject: Re: Checking for MF (was Re: Need some MF help) Message-ID: <1238@internal.Apple.COM> Date: 7 Apr 89 00:05:59 GMT Sender: usenet@Apple.COM Distribution: comp.sys.mac.programmer,comp.sys.mac Organization: Apple Computer, Inc. Lines: 41 References:<1562@neoucom.UUCP> <28689@ucbvax.BERKELEY.EDU> <1179@internal.Apple.COM> <12910@dartvax.Dartmouth.EDU> In article <12910@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes: > In article <1179@internal.Apple.COM> goldman@apple.com (Phil Goldman) writes: > >In article <28689@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu (David > >Phillip Oster) writes: > >> The standard, from Apple is "Don't even try to do this". Most people do > >> it by checking to see if the end of the system heap is close to the > >> beginning of the application heap. If it is, no multifinder. > > > >This is a very bad thing to do, and, as was mentioned in a previous > >posting, the one known legitimate reason for doing so will soon be fixed > >in SysEnvirons. > > > I fully agree that it is bad to check for Multifinder in terms of > future compatibility. If Apple wants developers to refrain from doing > this, they should NOT DISTRIBUTE DEVELOPER'S TOOLS WHICH OBVIOUSLY DO. > I have MPW Shell 2.0.2, and it obviously knows whether Launch will > return or not, and therefore knows whether MultiFinder is active. It > undoubtedly uses some non-approved method of finding out whether > MultiFinder is active or not. Apple cannot reasonably expect > developers to refrain from checking for MultiFinder active, and at the > same time sell them a program which does. "Don't do as I do, do as I > say." is not very convincing coming from anybody. As I mentioned in the original posting, there is currently one legitimate reason to check for MF. It can be done by applications that need to know whether _Launch will return. This will be fixed in a future System release. Until then, the approved method, which the MPW Shell uses, is to check for the existence of the temporary memory trap. What Apple says (in the Technotes), and does (in the code for the Shell) is to request that _Launch not even be called, unless the application is a programming environment and is willing to be broken across System releases. This is a bit harsh, and will probably not happen, but both criteria are true of the Shell. -Phil Goldman Apple Computer