saj@chinet.UUCP (Stephen Jacobs) (03/29/88)
I'm experiencing a rather disconcerting problem with a dialog box I'm trying to manage. The configuration is: 1040 ST, color monitor, Mark Williams C v2.1.7, K-Resource. The problem is that the dialog contains some 3-digit numeric editable fields--I sprintf() numbers into char[4] variables, then set the appropriate te_ptext pointers to the unsubscripted names: at first it seems to work fine. The numbers in the editable fields when the form is first displayed are the correct initial values; if I select one with the mouse and hit <ESC>, the field is cleared. However, if I select one with the mouse and backspace over it, the rightmost digit is not erased--the other two digits are! Furthermore, once I have the cursor at the beginning of the field, when I type numbers into it, the first number typed just moves the cursor; the second number typed echoes the first, the third echoes the second. After sscanf()- ing the strings after return from the form, then redisplaying the form, the values shown are appropriate to what was actually typed in, not to the odd stuff that was shown in the form. Can anyone tell me what's happening, and what to do about it? I've done similar things before, but with longer strings. For reference, the validation characters for the field are XXX