Generic function
Returns the gadget value of the specified gadget.
gadget-value gadget => gadget-value
<value-gadget>.
<object>.
duim-gadgets
duim-gadgets
Returns the gadget value of the specified gadget.
The interpretation of the value varies from gadget to gadget. Most gadgets conceptually have "raw" values that can be determined directly using the generic function appropriate to the gadget class concerned (gadget-text for an instance of <text-gadget>, gadget-selectionfor an instance of <collection-gadget>, and so on). These gadget classes also have a convenience method on gadget-value that wraps up the raw value in some useful way. So, text gadgets have a method on gadget-value that converts the gadget-textbased on the gadget-value-type, for example converting the string to an integer for value-type: <integer>.
The gadget-value method for collection gadgets is different for single and multiple selection gadgets. For single selection, the item that is selected is returned. For multiple selection, a sequence of the selected items is returned.
Note: If the gadget ID has been specified for a tab control, then this is returned as the gadget value.
Create a radio button:
*radio* := contain(make(<radio-button>,
label: "Radio")); The gadget value of *radio* can be returned as follows:
gadget-value(*radio*);
If the radio button is selected, gadget-value returns #t. If not selected, gadget-value returns #f.
gadget-id, page 564
gadget-value-key, page 589
gadget-value-range, page 590
gadget-value-setter, page 592
gadget-value-type, page 593