[comp.sys.mac] System 6.0 breaks my CDEVS!

thecloud@pnet06.cts.com (Ken Mcleod) (06/13/88)

 Practically all the public domain/shareware cdevs I used with no problem
under System 4.2/Control Panel 3.2 appear to break under System 6.0/CP 3.3.
Usually it's "The Control Panel cannot get enough memory" (with almost
2 megs free?!), but other alerts have popped up as well. One of the
"broken" cdevs includes the Apple "Sample" cdev from IM V, which I compiled
myself. Hmmmm....
 I think the problem may be that these cdev's do not have a 'sysz'
resource. Am I right?

Ken McLeod =========================     .......     ======================
UUCP: {crash uunet}!pnet06!thecloud     :.     .:    Chief Weapons of UNIX:
ARPA: crash!pnet06!thecloud@nosc.mil   :::.. ..:::   "Fear, surprise, and
INET: thecloud@pnet06.cts.com             ////        ruthless efficiency."

thecloud@pnet06.cts.com (Ken Mcleod) (06/14/88)

 Well, after looking more closely, I discovered the reason why various
cdev's were breaking under System 6.0: they check for the presence of
certain packages in the System file (usually PACK 7 or PACK 4) that
no longer exist! (except in the ROM). Even Apple's Sample cdev in IM V
does this (although there's a brief disclaimer that you "really should"
check for the packages in ROM). Ouch.
 
 Then there's the MultiFinder test. Most sample source code I've seen
(actually, ALL) checks for MultiFinder's presence by testing to see
whether the WaitNextEvent trap is implemented. Now, in System 6.0,
it's implemented ALL THE TIME, whether you're in MF or not. So if
application X assumes it's running under MultiFinder when it isn't,
well, look out.

 Question: how do you detect MultiFinder's presence or absence under 6.0?

Ken McLeod =========================     .......     ======================
UUCP: {crash uunet}!pnet06!thecloud     :.     .:    Chief Weapons of UNIX:
ARPA: crash!pnet06!thecloud@nosc.mil   :::.. ..:::   "Fear, surprise, and
INET: thecloud@pnet06.cts.com             ////        ruthless efficiency."

spector@vx2.GBA.NYU.EDU (David HM Spector) (06/15/88)

I had exactly the same problem.  If you are using the sources listed in the
APDA draft, that could be one problem.  Between the draft and the release of
the A-W version of IM V.5 they changed the source.  Primarily to enchance the
eror checking.  If you are using the sources listed in the _release_ version
of IM V 5, them make sure there really is enuf memory to run, the example
checksfor the BCD pack, and under the new system  this is not a good check,
I use a larger package like the disk init package...  for really involved
cDevs I try to allocate a large chuck o'memory and then dispose of it to
make sure I can still run (usually a bit larger than the handle to my
existing storage, if I am already open)...
Best bet is to rewrite EnoughRoomToRun to reflect the memory you're really
going to need.  

Hope this helps...
		David

-------------------------------------------------------------------------------
David HM Spector				New York University
Senior Systems Programmer			Graduate School of Business
Arpa: SPECTOR@GBA.NYU.EDU			Academic Computing Center
UUCP:...!{allegra,rocky,harvard}!cmcl2!spector	90 Trinity Place, Rm C-4
HamRadio: N2BCA      MCIMail: DSpector          New York, New York 10006
AppleLink: D1161     CompuServe: 71260,1410     (212) 285-6080
"What computer puts out work like this?"  "Hire us and we'll tell you."
XYZZYGLORP

singer@endor.harvard.edu (Rich Siegel) (06/16/88)

In article <226@hodge.UUCP> thecloud@pnet06.cts.com (Ken Mcleod) writes:
> Question: how do you detect MultiFinder's presence or absence under 6.0?

	I'm not sure there's a surefire test, but instead of WaitNextEvent
($a860)), try checking MFDispatch ($a88f). That seems to work OK for me.


Rich


Rich Siegel
Quality Assurance Technician
THINK Technologies Division, Symantec Corp.
Internet: singer@endor.harvard.edu
UUCP: ..harvard!endor!singer
Phone: (617) 275-4800 x305

David_Alan_Newman@cup.portal.com (06/16/88)

Ken McLeod asks:

> Question: how do you detect MultiFinder's presence or absence under 6.0?

We but the same question to Apple. Their response was, that there is NO
offical way to detect whether you're running under UniFinder or MultiFinder.
Their reason is that UniFinder will go away in a future system. In meantime,
we're kind of stuck. The MacDTS person even went as far as saying that
no one has given him a good reason for needing to know which Finder is
active. We told him why we wanted to know, but never received a response
back.

I urge others to make their reasons known to Apple as well. As long as our
1applications have to run under both Finders, there should be a way provided 
to know which it is.

Dave Newman
david_alan_newman@cup.portal.com

mkg@lzsc.ATT.COM (Marsh Gosnell) (06/16/88)

In article <226@hodge.UUCP>, thecloud@pnet06.cts.com (Ken Mcleod) writes:
> 
>  Question: how do you detect MultiFinder's presence or absence under 6.0?

The method I've been using is to check the last item in the Apple menu to
see if it's "About MultiFinder..."  
   Marsh Gosnell  lzma!mkg

han@Apple.COM (Byron Han, Licensed To Dream) (06/17/88)

In article <1128@lzsc.ATT.COM> mkg@lzsc.ATT.COM (Marsh Gosnell) writes:
>In article <226@hodge.UUCP>, thecloud@pnet06.cts.com (Ken Mcleod) writes:
>> 
>>  Question: how do you detect MultiFinder's presence or absence under 6.0?
>The method I've been using is to check the last item in the Apple menu to
>see if it's "About MultiFinder..."  

Sorry - that is very non localization friendly.  Different countries have
different items for "About MultiFinder...".  

One way to check that MultiFinder is installed to see whether or not
the WaitNextEvent trap is implemented.  

Hope this helps.

-- 
Byron Han,  Licensed to Dream.             Macintosh - One Small Step For Apple.
Apple Computer, Inc. MS 27Y                ----One Giant Leap for Humankind.----
ATTnet:408-973-6450     applelink:HAN1     domain:han@apple.COM       MacNET:HAN
GENIE:BYRONHAN    COMPUSERVE:72167,1664    UUCP:{sun,voder,nsc,decwrl}!apple!han

peirce@claris.UUCP (Michael Peirce) (06/17/88)

In article <1128@lzsc.ATT.COM> mkg@lzsc.ATT.COM (Marsh Gosnell) writes:
>In article <226@hodge.UUCP>, thecloud@pnet06.cts.com (Ken Mcleod) writes:
>> 
>>  Question: how do you detect MultiFinder's presence or absence under 6.0?
>
>The method I've been using is to check the last item in the Apple menu to
>see if it's "About MultiFinder..."  
>   Marsh Gosnell  lzma!mkg

Wouldn't this cause problems for none English speaking users?  I don't
think that ABOUT is a universal word.  I'd use another method.

-- michael

dorourke@polyslo.UUCP (David O'Rourke) (06/19/88)

In article <12321@apple.Apple.COM> han@apple.apple.com.UUCP (Byron Han, Licensed To Dream) writes:
> {Checking for WaitNextEvent}

  I believe this is a problem and you might have missed the original posting
regarding checking for MF.  WaitNextEvent appears to have been implemented
always under System 6.0.  If this is true then checking for this trap won't
work because you will find it implemented even though you're under Uni-Finder.
-- 
David M. O'Rourke

Disclaimer: I don't represent the school.  All opinions are mine!