In general, a component's name is what you will use to look up its value, while the caption is what is displayed to the user.
The value need not be a string. It is converted to a string using the format function,
and
when the user exits a textbox, the text is passed to acceptor:
There are several predefined acceptor functions listed below. For example:
DialogField
DialogLabel( caption )
DialogHidden( name, value )
DialogCheckBox( name, caption, value=False )
DialogRadioGroup( name, caption, choices, value )
values is one of those strings
DialogText( name, caption, value="", acceptor=acceptString, format=str )
newvalue = acceptor(text)
and the return value (of whatever type) becomes the DialogText's new value.
The user can't close the dialog if acceptor raises an exception.
DialogText("anInt", "Must be an integer:", "0", acceptInt)
DialogText("boundedInt", "Int between 1 and 5:", "0", acceptIntBetween(1, 5))
FieldAcceptException( badStr, msg )
badStr: the string that was not accepted
msg: a phrase to chastise the user
acceptString
acceptInt
acceptIntLessThan( ub )
acceptIntGreaterThan( lb )
acceptIntBetween( lb, ub )
acceptFloat
acceptFloatLessThan( lb )
acceptFloatGreaterThan( lb )
acceptFloatBetween( lb, ub )
acceptFloatAbsBetween( lb, ub )
acceptList( acceptor, dashrange, description )
acceptIntList( acceptor=acceptInt, description='integers' )
acceptFloatList( acceptor=acceptFloat, description='numbers' )
acceptDimList( acceptList, dim, msg )
Meant to be chained with a typed list acceptor above, as in
acceptDimList( acceptIntList(acceptIntGreaterThan(-1)), dim=2, msg='2 states please (from and to)' )