Message299263
In comment for 31003, Cheryl pointed to
https://stackoverflow.com/questions/4140437/interactively-validating-entry-widget-content-in-tkinter#4140988
That prompted me to grep for 'validatecommand'. "validatecommand=is_int" is used on the extension tab. The function is at the end of the file. We just need to modify to is_pos_int and use it the same way.
is_int allows blanks. That should mean to accept the default, whatever is it. A blank should be turned back to the default. is_int checks that int(entry) does not raise value error. I believe int now accept non-ascii digits. We should check that that such pass through configparser okay. (I believe they should, as I believe it just calls int on the string read.) Or only store the ascii version. I suspect that tk wants ascii digits,
The confusion of converting between strings and non-string objects is exacerbated by tk wanting strings (which it converts to C byte encodings) and tkinter doing automatic conversions. |
|
Date |
User |
Action |
Args |
2017-07-26 20:50:58 | terry.reedy | set | recipients:
+ terry.reedy, louielu, cheryl.sabella |
2017-07-26 20:50:58 | terry.reedy | set | messageid: <1501102258.55.0.425079112552.issue31051@psf.upfronthosting.co.za> |
2017-07-26 20:50:58 | terry.reedy | link | issue31051 messages |
2017-07-26 20:50:58 | terry.reedy | create | |
|