Author terry.reedy
Recipients csabella, louielu, terry.reedy
Date 2017-07-26.20:50:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501102258.55.0.425079112552.issue31051@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-07-26 20:50:58terry.reedysetrecipients: + terry.reedy, louielu, csabella
2017-07-26 20:50:58terry.reedysetmessageid: <1501102258.55.0.425079112552.issue31051@psf.upfronthosting.co.za>
2017-07-26 20:50:58terry.reedylinkissue31051 messages
2017-07-26 20:50:58terry.reedycreate