[net.micro.mac] Megamax control problem

wiso@ihwpt.UUCP (Jack Wisowaty) (10/15/85)

I am having a problem deactivating particular controls in a multi-control
window.  I have a window with eight controls and if I use the command
hilitecontrol(thecontrol,254) to deactivate say control #5, it deactivates
5, 6, 7, and 8.  Findcontrol returns 254 for 5-8 as well as for any other
location in the window.  Only clicking in controls 1-4 returns 11 (for a
mousedown in the checkbox).  I should point out that the highlighting does
not change for controls 6-8 (they don't dim) but you can't click on them.
If I pass 255 to hilitecontrol instead of 254 eveything seems to work as
Inside Mac says that it should.  Any ideas what can be going on here or is
this a bug in Megamax?  BTW, I am running version 2.1.  Any help would be
greatly appreciated!

Jack Wisowaty
ihnp4!ihwpt!wiso

guido@boring.UUCP (10/19/85)

In article <517@ihwpt.UUCP> wiso@ihwpt.UUCP (Jack Wisowaty) writes:
>I have a window with eight controls and if I use the command
>hilitecontrol(thecontrol,254) to deactivate say control #5, it deactivates
>5, 6, 7, and 8.  Findcontrol returns 254 for 5-8 as well as for any other
>location in the window.  Only clicking in controls 1-4 returns 11 (for a
>mousedown in the checkbox).

It seems that this is a bug in the Toolbox.  I have experienced similar
problems with 254 highlighting, and finally decided to use 255 highlighting
instead.  My theory is that the control definition's Test routine returns
254 when it is called if the control has 254 highlighting EVEN WHEN THE
MOUSE IS OUTSIDE THE CONTROL.  Funnily, the wording of the paragraph
describing the Test routine indeed suggests this if taken literally.
-- 
	Guido van Rossum, CWI, Amsterdam (guido@mcvax)