Rob Lahaye wrote: > Rob Lahaye wrote: > >> Angus Leeming wrote: >> >>> >>> But, sure, this is a sample piece of code. You may find this preferable: >>> CheckedGlueLength(FL_OBJECT * input, >>> FL_OBJECT * choice, >>> FL_OBJECT * label=input); >>> Ie, the default value for the third arg is the same as the first, so >>> you can get away with writing just two. >>> >>> Or, indeed, this >>> CheckedGlueLength(FL_OBJECT * input, >>> FL_OBJECT * choice, >>> FL_OBJECT * label=0); >>> >>> although that means you'd have to alter checked_widgets.C a little too.
Angus, There's a problem. Open the paragraph dialog (in which you have included the checkedWidgets code), enter an invalid length and then click on [Close], the only activated button now. Open the paragraph again and see that the label is colored red, despite the fact that the invalid length has been cleared. Close the dialog and open again, gets rid of the red color. Hmmm, apparently the order is: 1) check isValid of the input fields (which still contains the invalid string!). 2) update the form by the update() function of the dialog; this will clear the invalid field. Result is that a cleared input field is marked as invalid :(. Should 1) and 2) be reversed, or will that break other functionality? Regards, Rob.