Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!oberon!pollux.usc.edu!papa From: papa@pollux.usc.edu (Marco Papa) Newsgroups: comp.sys.amiga.tech Subject: Re: How to deselect a gadget Message-ID: <12623@oberon.USC.EDU> Date: 6 Oct 88 18:07:56 GMT References: <3229@pt.cs.cmu.edu> Sender: news@oberon.USC.EDU Reply-To: papa@pollux.usc.edu (Marco Papa) Organization: Felsina Software, Los Angeles, CA Lines: 43 In article <3229@pt.cs.cmu.edu> mjw@f.gp.cs.cmu.edu (Michael Witbrock) writes: |Thanks for all the replies: | The consensus is that the only way to safely have a program unselect a | gadget is to REMOVE the gadget, fiddle its bits, and ADD it again. | This is not what I'd call neat. Maybe a general ModifyGadget() in a later | release? Not needed, it is all documented (see later). | In the end, what I did was to make my program do the gadget imagery and keep track of selection status itself. | Here is one tricky method suggested by Steve Tibbett: | || I just ran into the same thing myself. I don't think there is an official || way to deselect a gadget. Yes, there is. ||BUT due to a bug (or feature?), if you || do a refresh on a gadget that is already selected, (with the SELECTED bit || still set), it will complement the gadget again - thus deselecting it. || So, a seemingly safe way to do it (safe in that if CBM ever fixes it, || it will still work) is: Before fiddling with the SELECTED bits, do a || RefreshGList() on your gadgets (which will set everything back to || unselected state. Nope, don't do indoiscriminate RefreshGlists: the "CBM-recommended" way to "fiddle" with gadgets is: 1. RemoveGadget 2. fiddle with gadgets imagery, SELECTED, text, etc... 3. RefreshGadgets or RefreshGList Also (and this is documented twice in the 1.2 Enhancer docs) these games (especially the SLECTED toggle) can be played safely ONLY with gadget with imagery, not with simple boolean gadgets. This is not a bug. this is just the way things are and have been (the 1.2 Enhancer docs is almost two years old). -- 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] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=