Open abstract class
The class of all text gadgets.
text:<string>. Default value: "".
value-type:<type>. Default value: <string>.
value-changing-callback: duim-gadgets
duim-gadgets
The class of all text gadgets. You should not create a direct instance of this class.
The text: init-keyword specifies a text value for the combo box.
The value-type: init-keyword specifies the type of the gadget value of the text gadget, which by default is <string>. Other supported types are <integer> and <symbol>. The string entered in the text gadget is parsed, and converted to the appropriate type automatically.
Text gadgets have a method on gadget-value that converts the gadget-text based on the gadget-value-type, for example converting the string to an integer for value-type: <integer>.
The gadget-text generic function always returns the exact text typed into a text gadget. However, gadget-value always returns a "parsed" value of the appropriate type, depending on the value of gadget-value-type. If the string contains any characters that are not appropriate to the gadget-value-type (for example, if the string contains any non-integers, and the gadget-value-type is <integer>), then gadget-value returns #f.
Setting the gadget value "prints" the value and inserts the appropriate text into the text field.
The value-changing-callback: init-keyword allows you to specify a callback that is invoked as the value of the text gadget is changing during the course of "casual" typing. Generally, this means when the user is typing text, but before the text is committed (usually by pressing the RETURN key).
Conversely, the value-changed callback of a text gadget is invoked when the change to the gadget value is committed (again, usually by pressing the RETURN key).
The action required to "commit" a text change is defined by the back-end for the platform that you are writing for, and is not configurable.
contain(make(<text-field>, value-type: <integer>
text: "1234"));