Author terry.reedy
Recipients terry.reedy
Date 2016-06-24.04:15:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The custom popup entry dialogs in config_sec and config_help have a common structure and overlapping code.  When one hits OK and the entry is not valid, both display a specific message and let the user edit the entry (or Cancel).

File => Load Module, on the other hand, uses tkSimpleDialog.askstring.  No error checking is done before the box disappears.  If there is an error, even a simple misspelling, one must start over.  It is really annoying to use.  I want to replace this with a custom popup that would be the same as the one in config_sec, except for title, prompt, and validation function.  If the name given has multiple conponents, such as idlelib.idelhelp.help_xyz, I would like to report which is the first invalid component (going from left to right).

I am therefore adding a new module,, with a new Query class that will be the baseclass for three derived classes.

The partial patch renames (formerly to  The corresponding test_config_sec) becomes test_query.  It splits class GetCfgSectionNameDialog into a base class Query and a subclass SectionName.  Query is responsible for the popup, and used ttk widgets as appropriate.  SectionName overrides the entry validation function entry_ok (formerly name_ok).  The test functions have been similarly split.

What remains are ModuleName and HelpSource subclasses, corresponding tests, and integration with the software that would use them.
Date User Action Args
2016-06-24 04:15:18terry.reedysetrecipients: + terry.reedy
2016-06-24 04:15:17terry.reedysetmessageid: <>
2016-06-24 04:15:17terry.reedylinkissue27380 messages
2016-06-24 04:15:16terry.reedycreate