[comp.sys.amiga.tech] Gadget.MutualExclude?

phil@rice.edu (William LeFebvre) (03/16/89)

Okay.....   I REELY want to have two gadgets that are mutually exclusive.
That is, selecting one forces the other to automatically be unselected.  I
see the field "MutualExclude" in the struct Gadget.  Does Intuition pay
attention to it?  I tried to follow the sketchy documentation in the
include file, but to no avail.  Does this thing actually work, or am I
going to have to do it myself?  If it does work, then how?

What I'm after is something identical to what happens in preferences,
especially the printer preferences.  You have a series of gadgets
representing mutually exclusive choices.  Selecting one automatically
unselectes any of the others that might be selected.  I know I can do this
by hand, but I don't want to unless I have to.

			William LeFebvre
			Department of Computer Science
			Rice University
			<phil@Rice.edu>

papa@pollux.usc.edu (Marco Papa) (03/17/89)

In article <2858@kalliope.rice.edu> phil@rice.edu (William LeFebvre) writes:
>Okay.....   I REELY want to have two gadgets that are mutually exclusive.
>That is, selecting one forces the other to automatically be unselected.  I
>see the field "MutualExclude" in the struct Gadget.  Does Intuition pay
>attention to it?  I tried to follow the sketchy documentation in the
>include file, but to no avail.  Does this thing actually work, or am I
>going to have to do it myself?  If it does work, then how?

MutualExclude gadgets were never implemented.  Jimm though explained
clearly how to do it in the 1.2 Enhancer manual.  Get a copy of it,
it tells you everything.  It is really not that difficult.

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

eric@cbmvax.UUCP (Eric Cotton) (03/17/89)

In article <2858@kalliope.rice.edu> phil@rice.edu (William LeFebvre) writes:
>Okay.....   I REELY want to have two gadgets that are mutually exclusive.
>That is, selecting one forces the other to automatically be unselected.  I
>see the field "MutualExclude" in the struct Gadget.  Does Intuition pay
>attention to it?  I tried to follow the sketchy documentation in the
>include file, but to no avail.  Does this thing actually work, or am I
>going to have to do it myself?  If it does work, then how?

No, Intuition does not manage mutual exclusion of gadgets [correct me if
I am wrong JimM!].  Refer to pp. 59-60 of the V1.2 Enhancer Manual for
a description of how you can do it yourself.  In brief, though, you
RemoveGadget(), set or clear (as appropriate) the gadgets SELECTED flag,
AddGadget() it back, and then RefreshGList (or equivalent).

>What I'm after is something identical to what happens in preferences,
>especially the printer preferences.  You have a series of gadgets
>representing mutually exclusive choices.  Selecting one automatically
>unselectes any of the others that might be selected.  I know I can do this
>by hand, but I don't want to unless I have to.

Ack!  Believe me, you *don't* wanna know what Preferences is doing...
-- 
Eric Cotton
Commodore-Amiga                                               (215) 431-9100
1200 Wilson Drive                        {uunet|pyramid|rutgers}!cbmvax!eric
West Chester, PA 19380            "I don't find this stuff amusing anymore."