[comp.sys.amiga.tech] Mutual Exclude buttons

jms@tardis.Tymnet.COM (Joe Smith) (01/04/90)

>In article <22900@ut-emx.UUCP> hcobb@walt.cc.utexas.edu (Henry J. Cobb) writes:
>	Mr Sinz is right, the documented procedure would not work.  Why not use
>the field as a bit-map, whenever a gadget becomes selected any other gadgets
>with which it has a matching bit set, is deselected.
>	Example:
>Gadget A has bits 2 & 3 set
>Gadget B has bits 4 & 6 set
>Gadget C has bits 3 & 6 set
>	A and B will not deactivate each other but C will exclude both.  If a
>gadget has no bits set it neither excludes nor is excluded by any other gadget.

[Picture light bulb going off over my head]

Now I understand.  Let my recap:

The original (nonfunctioning) description has each gadget numbered, and the
MutualExclude field has one bit set for each of the up to 32 gadgets that
this one excludes.  When current gadget is selected, read its bits, then
locate the excluded gadgets by travelling down the linked list, counting
each gadget passed over and comparing that number with the bit number.

The main problem is that the numbers assigned to the gadgets is not clearly
spelled out.  Adding more system gadgets will change the numbering of the
user's gadgets.

Henry's idea:

Up to 32 mutual exclude groups can be defined.  Each gadget can belong to
any number of groups.  Gadget C above belongs to group #3 and group #6,
and when selected, cancels all other gadgets in group 3 and group 6.
Each gadget unambiguously identifies which group it belongs to by setting
the appropriate bit int the MutualExclude field.  The system gadgets belong
to no group, do not cancel any user gadgets, and cannot be cancelled by
any user gadgets.

A gadget (probably named "Defaults") can have all 32 bits set.  When
selected, it clears all other mutual exclude gadgets.  If any mutual exclude
gadget is selected, it turns off the "Defaults" gadget.

My alternative idea:

Use one half of the field for 16 flag bits, the other half to specify a
number from 0 to 64K to specify which group this gadget belongs to.  The
advantage is that more groups can be used.  All sorts of stuff can be done
with the 16 flag bits.

----

But what I want is not mutual exclude gadgets in general.
I just want radio buttons - a specific subset of the mutual exclusion
idea.  System defined images of round buttons.
Is that what we can expect in 1.4?
-- 
Joe Smith (408)922-6220 | SMTP: JMS@F74.TYMNET.COM or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-D21    | PDP-10 support: My car's license plate is "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."