enthought / enthought/traitsui
TraitsUI Menus and Toolbars force import of backend
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Because `Menu`, `MenuBar` and `ToolBar` are just renamed versions of equivalent Pyface objects which happen to be concrete toolkit objects, if you use these in a TraitsUI you end up choosing the backend at import time, which can be suboptimal.
In particular, the design of the rest of TraitsUI defers toolkit selection to the point where `edit_traits`\`configure_traits` is called, and this is important for allowing the writing of dual use CLI/GUI code.
Possible solutions include having proxy classes that defer creation of the actual instances, or perhaps using tasks menu/action schema that are designed for exactly this use case.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.