Message269154
| Author |
terry.reedy |
| Recipients |
terry.reedy |
| Date |
2016年06月24日.04:15:09 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1466741717.27.0.533147933113.issue27380@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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, query.py, with a new Query class that will be the baseclass for three derived classes.
The partial patch renames config_sec.py (formerly configSectionNameDialog.py) to query.py. 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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年06月24日 04:15:18 | terry.reedy | set | recipients:
+ terry.reedy |
| 2016年06月24日 04:15:17 | terry.reedy | set | messageid: <1466741717.27.0.533147933113.issue27380@psf.upfronthosting.co.za> |
| 2016年06月24日 04:15:17 | terry.reedy | link | issue27380 messages |
| 2016年06月24日 04:15:16 | terry.reedy | create |
|