#Modula-2 Oxxi Gadgets
13-Sep-87 09:27:29
Sb: #Modula-2 Oxxi Gadgets
Fm: Jim Vogel 73177,441
To: Steve Faiwiszewski 74106,425
Steve,
I am having some problems getting some gadgets to work the way I want to,
and wondered if you might have any suggestions. I have 3 Boolean text gadget's,
in a requester; I would like to select one, and have that deselect the other
two.
Since MutualExclusion is not working for gadget's yet, I have had to come up
with some cludge's.
First I tried OffGadget on all three, selecting and deselecting, then
OnGadget, and RefreshGList. While this made the gadget's blink quite nicely, it
didn't do what I wanted to!
Now I EndRequest, select and deselect, and then Request, which works OK,
except that the request blinks once, which does not look good. Here's the code
that I finally came up with…
PROCEDURE SwitchSel(gp1,gp2,gp3:GadgetPtr);
BEGIN
EndRequest(rp^,wp^);
IF NOT (Selected IN gp1^.Flags) THEN
INCL(gp1^.Flags,Selected);
END;
IF (Selected IN gp2^.Flags) THEN
EXCL(gp2^.Flags,Selected);
END;
IF (Selected IN gp3^.Flags) THEN
EXCL(gp3^.Flags,Selected);
END;
DC := Request(rp^,wp^);
END SwitchSel;
… any suggestion's?
Thanks,
Jim Vogel