[comp.sys.mac.programmer] Hierarchical menus -- drag delay found, and it's weird

tim@hoptoad.uucp (Tim Maroney) (02/11/90)

In article <1807@milton.acs.washington.edu> phaedrus@milton.acs.washington.edu
(The Wanderer) writes:
>In article <10059@hoptoad.uucp>, tim@hoptoad.UUCP (Tim Maroney) points out the
>problems with hierarchical menus going away if you deviate from the narrow
>drag path from the main menu to the hierarchical one, and how there's no
>obvious way to patch for this because it's all internal to MenuSelect.
>
>In article <2857@draken.nada.htk.se> d88-jwa@nada.kth.se (Jon W{tte) points
>out that IM documents that there is a hierarchical-menu popup delay and drag
>delay documented, but their locations are not.
>
>     I've seen a CDEV that governs this exact thing (called MenuDrag, or
>MenuSelect, or something like that).  There is indeed a popup and a drag
>delay for hierarchical menus; their values are stored in the PRAM (the
>extended area, I believe, so you'd have to use the xPRAM INIT to make changes
>stick on a Plus).  I have no idea what the specific location is, however
>(I'm at work and don't have my Mac or my IM manuals handy...)  Check the
>ftp sites for the CDEV, and check the IM documentation of the PRAM bytes for
>the exact location.

No, there's nothing about parameter RAM in Inside Mac volume V, and it
also seems strange to me that Apple would put something in parameter
RAM without giving users a way to set it from the Control Panel.

However, this got me to thinking -- what if they're using the menu
flash setting as the drag delay?  So, I just tested it, and it appears
this is the case.  I can drag to a submenu at a leisurely speed with
the menu flash set to 1, but I have to jerk my hand at setting 3; and 3
was my previous setting.  This explains why I was having problems.

It doesn't explain why the implementors thought there would be an
inverse relationship between the number of times a user wants the menus
to flash and the amount of drag delay a user wants, or why this feature
is so well hidden that the panel of experts here couldn't figure it out
until now.  Just another mystery of the Mac....
-- 
Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com

"Conversion, fastidious Goddess, loves blood better than brick, and feasts
 most subtly on the human will." - Virginia Woolf, "Mrs. Dalloway"

louis@asterix.drev.dnd.ca (Louis Demers) (02/11/90)

In article <2857@draken.nada.htk.se>
>
>     I've seen a CDEV that governs this exact thing (called MenuDrag, or
>MenuSelect, or something like that).  There is indeed a popup and a drag
>delay for hierarchical menus; their values are stored in the PRAM (the
>extended area,...

	I too seem to remember that these values were stored in PRAM, I
	think it was in the draft version of IM Vol V.

tim@hoptoad.uucp (Tim Maroney) writes:

>...However, this got me to thinking -- what if they're using the menu
>flash setting as the drag delay?  So, I just tested it, and it appears
>this is the case.

	I tried that and I could not see a difference in the tolerance of 
	the MenuSelect no matter what the menuflash setting was.

	I did find something interesting though, the drag delay seems
	to be used only if you drag a certain way.  If you leave the item
	having the hierarchical menu in  the general direction of the
	submenu, then the drag delay appears to be used.  If  you drag
	straight down, the switch to the new item will be immediate.

In his article, Mr. Maroney goes on  to say:
>                   I can drag to a submenu at a leisurely speed with
>the menu flash set to 1, but I have to jerk my hand at setting 3; and 3
>was my previous setting.  This explains why I was having problems.

	In view of my comments above, were you dragging exactly through
	the same path (I know it's difficult to evaluate :-) and using
	the same menu item , same start point ?

	Bye,

		Louis
	
-- 
| Louis Demers              | DREV, Defence Research Establishment,Valcartier |
| louis@asterix.drev.dnd.ca | POBox 8800, Courcelette,Quebec, CANADA, G0A 1R0 |
|            (131.132.48.2) | Office: (418) 844-4424       fax (418) 844-4511 |
+---------------------------+-------------------------------------------------+

murat@farcomp.UUCP (Murat Konar) (02/11/90)

In article <10164@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
>No, there's nothing about parameter RAM in Inside Mac volume V, and it
>also seems strange to me that Apple would put something in parameter
>RAM without giving users a way to set it from the Control Panel.

Just 'cause it's not documented doesn't mean it's not there.

>However, this got me to thinking -- what if they're using the menu
>flash setting as the drag delay?  So, I just tested it, and it appears
>this is the case.  I can drag to a submenu at a leisurely speed with
>the menu flash set to 1, but I have to jerk my hand at setting 3; and 3
>was my previous setting.  This explains why I was having problems.

No, something is still amiss.  I have my mac set at 3 menu flashes and 
I can take as long as 1.5 seconds (estimated) between selecting a parent
item and dragging over to its sub menu.  I wonder if you have inadvertently
mashed this low memory global somehow.  Try using someone elses Mac (with
some commercial type software, no INITs, just to make sure).  
-- 
____________________________________________________________________
Have a day. :^|             
Murat N. Konar	
murat@farcomp.UUCP             -or-          farcomp!murat@apple.com

dce@smsc.sony.com (David Elliott) (02/11/90)

>In article <10164@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes:
>>However, this got me to thinking -- what if they're using the menu
>>flash setting as the drag delay?  So, I just tested it, and it appears
>>this is the case.  I can drag to a submenu at a leisurely speed with

I don't think so.  I have a cdev called MenuTuner which can allegedly
change the PRAM values associated with drag and hierarchical popup
delays, but I haven't yet gotten it to allow me to change them.

The cdev appears to not like my Mac.  It displays one blank window, and
a window with instructions and values, but I can't change the values
in the boxes.  Since it uses color, I don't think the cdev is incompatible
with the Mac II.

Anyway, I can send this to anyone who wants it, though I think I found
it on sumex.
-- 
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"You see everything -- you're omnivorous."

dplatt@coherent.com (Dave Platt) (02/12/90)

Well, I recently downloaded a little cdev called MenuTuner, written by
Carlos Weber (author of the FKEY Manager application).  MenuTuner
permits you to adjust both hierarchical-menu timing controls... [1] the
amount of time that you must have the cursor on a parent menu item
before its associated submenu pops up, and [2] the amount of time during
which you can move the cursor off of the parent menu item before its
submenu vanishes.

It works.  It's nice!

And, interestingly enough, I find that simply hitting the "Reset to
defaults" button was all I really needed to do!  I have a hunch that
zapping the Mac's PRAM may set these delays to a ridiculously-low
value... perhaps to zero... and thus makes hierarchical menus harder to
use than when the Mac was "new, out of the box".  Just a hunch, though.

I'll mail MenuTuner to Info-Mac and to comp.binaries.mac.


-- 
Dave Platt                                             VOICE: (415) 493-8805
  UUCP: ...!{ames,apple,uunet}!coherent!dplatt   DOMAIN: dplatt@coherent.com
  INTERNET:       coherent!dplatt@ames.arpa,  ...@uunet.uu.net 
  USNAIL: Coherent Thought Inc.  3350 West Bayshore #205  Palo Alto CA 94303

chaffee@reed.UUCP (Alex Chaffee) (02/12/90)

In article <1990Feb11.155212.20053@smsc.sony.com> dce@Sony.COM (David Elliott) writes:
>I don't think so.  I have a cdev called MenuTuner which can allegedly
>change the PRAM values associated with drag and hierarchical popup
>delays, but I haven't yet gotten it to allow me to change them.

I have the latest version of MenuTuner, fresh from Compu$erve.  The first
release used 32-bit PICTs which didn't show up on some Macs.  I'll send it to
sumex.

>The cdev appears to not like my Mac.  It displays one blank window, and
>a window with instructions and values, but I can't change the values
>in the boxes.  Since it uses color, I don't think the cdev is incompatible
>with the Mac II.

The "blank window" problem is fixed (see above).  I don't know about the
other problem; try asking Carlos at 70277.726@compuserve.com.

>David Elliott
>dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
>(408)944-4073
>"You see everything -- you're omnivorous."


-- 
Alex Chaffee
chaffee@reed.UUCP
Reed College, Portland OR 97202
____________________

louis@asterix.drev.dnd.ca (Louis Demers) (02/12/90)

This weekend, I dug through the ROM and MPW 3.0 include files.
I found that SubMenu delay is stored at byte 126 of PRAM and
the drag delay is at byte 127.  At boot time, the values
in PRAM are copied into low memory globals.  At B5C is 
stored a handle; at offset 14 and 15 are stored both delays.

If you just change the PRAM, you changes will take effect only
after you reboot.

If the PRAM values are 0, after they are copied to the RAM globals,
8 is added to the submenu delay, and 60 is added to the drag delay.
so these are the defaults.

To acces the extended PRAM, you need to use ReadXPram ($A051) and
WriteXPram ($A052).  Both use the same calling convention.
A0 points to the data beeing transferred, the upper word of D0
contains the number of bytes to transfer, the lower word of D0
contains the index in PRAM where the transfer will take place.

I wrote an MPW tool and experimented with those values and they
work ! 8-).  I was about to write a cdev, but this morning's news
indicate that such a thing is already available. Oh well.

Note that my earlier comment about the delay being used only if
the movement is in the general direction toward the submenu still
holds.

History note:  I recall seeing a reference to the PRAM on the topic
of the menu delays in the beta draft of IM Vol V but in the beta version
of the include files, no reference was made to the delays.
In the final version of IM Vol V, no reference is made to the PRAM
but now the include files give enough information about the delays and
the PRAM to use them ! how's that for documentation ?


	Bye,
	Louis
-- 
| Louis Demers              | DREV, Defence Research Establishment,Valcartier |
| louis@asterix.drev.dnd.ca | POBox 8800, Courcelette,Quebec, CANADA, G0A 1R0 |
|            (131.132.48.2) | Office: (418) 844-4424       fax (418) 844-4511 |
+---------------------------+-------------------------------------------------+