enthought / enthought/traitsui

DateEditor maximum and minimum name traits poorly implemented

Open
#606 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

The `DateEditor` factory allows specifying trait names to hold the earliest and latest dates that can be set. However they are implemented problematically:

- they aren't supported at all under Wx
- in the Qt backend they are evaluated once at control creation time, and not thereafter: there is no synchronization if the value of the names trait changes
- the first time they are evaluated, they modify the factory object to hold the values (this is perhaps bad design, rather than a bug, as each new editor will overwrite the values of the previous one)
- the function that gets the values is an `eval`-ed `lambda` rather than (a wrapper around) `xgetattr`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.