You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/terryjreedy'closed_at=Nonecreated_at=<Date2020-01-27.23:34:59.719>labels= ['expert-IDLE', 'type-bug', '3.9']
title='IDLE: improve handling of int entry in settings dialog'updated_at=<Date2020-01-28.12:32:21.133>user='https://github.com/terryjreedy'
Spinoff from bpo-31414, about int entry fields. It claims: Note: a deeper problem is attaching a tracer that get called with each keystroke. Using a StringVar avoids the error when the entry is blanked, but currently allows non-ints to be saved. A better solution would be to not do the auto tracing, but use a IntVar and only call var_changed when the user 'leaves' the box, after checking for a count in a sane range.
With keeping it a StringVar, there is an issue where it writes a blank (ie, bad data) to the config file. Steps to reproduce:
Go into config dialog and click 'General' tab.
Delete value from 'Auto squeeze min line'
Click apply or OK. A warning message appears in the terminal
Warning: config.py - IdleConf.GetOption -
invalid 'int' value for configuration option 'auto-squeeze-min-lines'
from section 'PyShell': ''
Close out of IDLE.
Start IDLE again - the warning reappears, but on the General tab, it shows the original value.
The issue here is that the custom config-main.cfg is being written to (and then read back in) with the blank.
I picked the auto-squeezer because it has validation on it - validatecommand=self.digits_only.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: