Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cbmvax!ken From: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Newsgroups: comp.sys.amiga.programmer Subject: Re: Boolean Gadget Mutual Exclusion? Message-ID: <18431@cbmvax.commodore.com> Date: 1 Feb 91 16:14:28 GMT References: <659@esosun.UUCP> Reply-To: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Organization: Commodore, West Chester, PA Lines: 39 In article <659@esosun.UUCP> smithey@esosun.css.gov.UUCP (Brian Smithey) writes: >I want to create a set of "radio buttons"...with TOGGLESELECT gadgets... >...I'd traverse my list of radio-button gadgets, and remove the SELECTED >flag if one of the gadgets were already selected. I'd also prefer to >use RELVERIFY with these boolean gadgets. Sounds like you're on the right track, just be sure that you remove the gadgets (RemoveGadget() or RemoveGList()) before modifying it. When you are done changing the gadget, you can add it back and refresh it to update the display. >The RKM says that you must use >hit-select rather than toggle-select, and GADGIMMEDIATE >rather than RELVERIFY when doing mutual exclusion with >boolean gadgets. Mutual exclude gadgets are not supported through Intuition, you have to use Gadtools or roll your own. If you create your own, then you can make up the rules as you go along. The RKM shows one way to implement this function. If you want a different functionality to your gadgets, feel free to do so. The wording in the RKMs is a bit strong, clearly (as long as you follow the rules) you can use any technique you want to get the desired result. The "code police" will not come to get you if you use another technique. >However, earlier they talk about "turning >off" excluded gadgets; I'm never turning any of these gadgets >off (assuming this means the GADGDISABLE flag or OffGadget()), >just modifying the SELECTED state (and refreshing)... Again, you don't need to "turn off" the gadgets, you need to remove them from the gadget list before you modify them. Modifying gadget structures without removing them is illegal. -- -- Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines uucp: ken@cbmvax.commodore.com or ...{uunet,rutgers}!cbmvax!ken bix: kfarinsky