[comp.sys.mac] MacMan and double-clicking

mesard@bbn.com (Wayne Mesard) (04/16/88)

A couple of people have posted saying that after running the MacMan
application, double clicking in the Finder no longer opens things (until
the machine is rebooted).

Is there anyone that this _doesn't_ happen to?  It sure is bugging the
heck out of me and my Mac+ running Finder 6.0/System 4.2.

I ran into a similar problem last year on someone else's machine.
(Double-clicking wouldn't work until AFTER an application had been run.)

Does anyone understand what's going on here, and more importantly, how
MacMan can be fixed?  (Is its author listening?)

-- 
unsigned *Wayne_Mesard();                     MESARD@BBN.COM
                                              BBN Labs, Cambridge, MA
"All systems of useful complexity contain
 software errors."
               -The Eastport Report, p.14

perkins@acf8.UUCP (Mark E. Perkins) (04/16/88)

> A couple of people have posted saying that after running the MacMan
> application, double clicking in the Finder no longer opens things (until
> the machine is rebooted).

    I notified the author about this problem not long after the posting.
I have not received any reply.

    The probelm is that MacMan (and some other stuff I've seen) is
leaving the System Event Mask set so that it ignores mouseUp events.
The Finder does not reset the mask to everyEvent.  Hence, the problem
with double-clicks.

    I have not found a way to patch these prpgrams directly,
but I made an FKEY that fixes the situation.  All it does is set
the System Event Mask to everyEvent, then return.  I can e-mail
to anyone interested.  If there is sufficient interest, I could post
it (it's VERY short).

    Please direct responses to the address below.

	Mark Perkins

Internet:  mark@vml.psych.nyu.edu	(that's VEE-EM-ELL)
Usenet:    {seismo|ihnp4|allegra}!cmcl2!vml!mark
US Mail:   Department of Psychology, NYU
	   6 Washington Place, room 970
	   New York, NY 10003
Phone:	   (212) 998-7861

shinberd@unioncs.UUCP (David Shinberg) (04/17/88)

In article <23499@bbn.COM> mesard@BBN.COM () writes:
>A couple of people have posted saying that after running the MacMan
>application, double clicking in the Finder no longer opens things (until
>the machine is rebooted).

The problem is most likely that the application resets the EventMask to
exclude MouseUpEvents.  Then the application does not set the EventMask
back to EveryEvent.  Therefore the MouseUp Events are not detected which
causes the stated problem with double clicking.  The solution is simple
before the program quits it should reset the EventMask to EveryEvent.
Please note: This is just a probable explanation (It happened to me) but
may not be the real problem

_______________________________________________________________________________
| Disclaimer: Don't Blame me I'm just learning this myself                    |
|								              |
| David Shinberg		       UUCP: uunet!steinmetz!unioncs!shinberd |
| Box 2073 			       Bitnet: 88_shinb@union                 |
| Union College								      |
| Schenectady NY, 12308							      |
|_____________________________________________________________________________|

nagel@bonnie.ics.uci.edu (Mark Nagel) (04/17/88)

In article <23499@bbn.COM> mesard@BBN.COM () writes:
>A couple of people have posted saying that after running the MacMan
>application, double clicking in the Finder no longer opens things (until
>the machine is rebooted).
>
>Is there anyone that this _doesn't_ happen to?  It sure is bugging the
>heck out of me and my Mac+ running Finder 6.0/System 4.2.

It's already been mentioned that this happens because MacMan alters
the global SysEvtMask at location $0144.  I modified MacMan to prevent this,
although my method may be incorrect or whatever.  What I did was search for
the string 0144 using Fedit or any disk editor in the MacMan program and 
changed it to 0000.  This forces MacMan to store the new event mask in 
location 0 which is unused.  I would've chosen another place, like AppScratch
or similar, but I wasn't sure whether MacMan was using it.  The string 0144
only occurs one time, so you should be able to change it easily.  It cures the
problem, but I feel strange about the way I did it.  It would have probably
been better to change the entire store instruction to NOP's, but I didn't do
this.  REMEMBER to do this on a copy...

Mark D. Nagel    Department of Information and Computer Science, UC Irvine
                 nagel@ics.uci.edu             (ARPA)
                 {sdcsvax|ucbvax}!ucivax!nagel (UUCP)

wdcastell@trillium.waterloo.edu (David Castell) (04/18/88)

I have found that if an application changes the value of the
global variable Ticks (time in ticks since startup), strange
things will happen to mouse clicking.  The problem I experienced
was that mouse clicks weren't recognized at all, but the double-clicking
problem you are describing could also come from the application
changing the value of Ticks, since the system uses the value of TICKS
to determine the time between double clicks.

I don't think this problem occurs on all Macs (I've never had it happen on
SE's).

straka@ihlpf.ATT.COM (Straka) (04/18/88)

In article <23499@bbn.COM> mesard@BBN.COM () writes:
|A couple of people have posted saying that after running the MacMan
|application, double clicking in the Finder no longer opens things (until
|the machine is rebooted).
|
|I ran into a similar problem last year on someone else's machine.
|(Double-clicking wouldn't work until AFTER an application had been run.)

I had the same problem a while ago after patching Megaroids+ for the
basicglob (MegaMax) problem.  After running Megaroids+, double-clicking no
longer seemed to work.

Perhaps this is a more general problem.
-- 
Rich Straka     ihnp4!ihlpf!straka

Advice for the day: "MSDOS - just say no."

perkins@acf8.UUCP (Mark E. Perkins) (04/18/88)

>>A couple of people have posted saying that after running the MacMan
>>application, double clicking in the Finder no longer opens things (until
>>the machine is rebooted).
>
> It's already been mentioned that this happens because MacMan alters
> the global SysEvtMask at location $0144.  I modified MacMan to prevent this,
> although my method may be incorrect or whatever.  What I did was search for
> the string 0144 using Fedit or any disk editor in the MacMan program and 
> changed it to 0000.  This forces MacMan to store the new event mask in 
> location 0 which is unused.  I would've chosen another place, like AppScratch
  ^^^^^^^^^^^^^^^^^^^^^^^^^^

    This could cause problems on other fronts.  Debuggers like to stick
and odd value in $0000 to assist programmers in trapping null pointer
references (now, who'd be silly enough to do that? 8-)).  Whatever MacMan
was putting into $0144 is now in $0000 and will probably stay there.
If it was odd, then you'd never notice, but if it's even, referencing
a null pointer would have unknown effects.  I wouldn't recommend
this solution.

    I have received several requests for my FKEY that resets $0144.
I had a hard disk catastrophe over the weekend, so I will respond as
soon as everything is recovered.

    Also, Jon Hueras has pointed out to me that the default
System Event Mask is NOT everyEvent, rather it is everyEvent minus
the keyUp bit.  I will make this change before passing along the
FKEY.

	Mark Perkins

Internet:  mark@vml.psych.nyu.edu	(that's VEE-EM-ELL)
Usenet:    {seismo|ihnp4|allegra}!cmcl2!vml!mark
US Mail:   Department of Psychology, NYU
	   6 Washington Place, room 970
	   New York, NY 10003
Phone:	   (212) 998-7861

perkins@acf8.UUCP (Mark E. Perkins) (04/20/88)

    I just packed up my 45 Meg MacBottom to send to PCPC for repairs
(head alignment problems, but see later note).  Before doing so, I managed
to rescue the FKEY that resets the System Event Mask (kept in $0144) to
it's default value (everyEvent EXCEPT keyUp).  It is FKEY 0.  Use
ResEdit to install in your system (or wherever).

    I had a fairly large number of requests for this thing and several
people encouraged posting it here.  Since the BinHex is only 7-1/2 lines,
here it is.

    The code of this FKEY is very simple:

		move.w    #ffef, $0144	;shove the mask in SysEvtMask
		rts			;back where we came from

    I hope this doesn't break any rules.  I've been using it without
incident for several weeks.  (Yes, I'm having HD problems, but I doubt
that this FKEY had anything to do with it...)  At any rate, standard
disclaimers apply.  If you use this thing and your Mac breathes flames
at you, I can't be held responsible.

	Mark Perkins
	presently:  NYU Department of Psychology
	soon to be:  AT&T Small Business Systems Laboratory

Internet:  mark@vml.psych.nyu.edu	(that's VEE-EM-ELL)
Usenet:    {seismo|ihnp4|allegra}!cmcl2!vml!mark
US Mail:   Department of Psychology, NYU
	   6 Washington Place, room 970
	   New York, NY 10003
Phone:	   (212) 998-7861

-------------------------  (Cut Here)  -------------------------
(This file must be converted with BinHex 4.0)

:%&*PFf9d)&0jFd9fG%eKFfX!4NY&@9&%-68!N!J"6l!S!*!%!3#3!`%-!*!$$!#
3!d0#TkMX)&rHr!!16Y!!N!8J!$!!1!!m!$i!2`!q!$`38Q9cCA3J8hPc4ACd6@&
cDh-#!*!$4NY&@9&%-68"!*!$4NY&@9&%-68"!!"`!0J!N!a`-3#3"*j`Na`!N!B
"6`6-B!S!!%0%48B!N!-+6PErb%MR(hJ-EJ!$!!aX!!$85'lrl+LBU*i-H$rr!Sj
6l[rUBR`J95"32bJ!5$mm!!'SL8KZrmkU'8KZrmLU'N+R3LF[,J!15'm!"UT%9%m
JAb"3)'J!##e)rpkJ+5e3rpT#Td)R)'i!$L"3,bJ!"%K[!!B!N!-)-Icrl`&%6R8
!!!%!N!-"$!#3!``!N!0$!!)9)!+8!*!$(!!b!!"'5d9C!*!$#J#3"#!!N!3#JkS
38Q9cCA3J8hPc4ACd6@&cDc,[!:
Relay-Version: version nyu B notes v1.5 12/10/84; site acf8.NYU.EDU
From: deragon@acf8.UUCP (John Paul Deragon)
Date: 19-Apr-88 22:14 EST
Date-Received: 19-Apr-88 22:14 EST
Subject: More ResEdit wierdness...
Message-ID: <22780005@acf8.UUCP>
Path: acf8!deragon
Newsgroups: comp.sys.mac.programmer
Posting-Version: version nyu B notes v1.5 12/10/84; site acf8.UUCP
Organization: New York University


More ResEdit fun...

   Try holding down, command & option along with the tilde key.
   (above the tab on the mac plus keyboard) and select
   About RedEdit. I am running ResEdit version 1.1b3
   and when I did this I got a big dialog box..and well
   see for yourself..


_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
| John P. Deragon                     Phone: 212-998-3467        |
| NYU Robotics and Intelligent Automation Lab              _     |
| deragon@cadman.nyu.edu-arpa         DELPHI:JPDERAGON   /(~)\   |
| deragon@acf8.nyu.edu-arpa       Compuserve:72160,2010    U	 |
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_  WOOF! _-_ 
						       |-_-_-_|