Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File / FileEditor no history (entries option not working) #1530

Closed
mo-han opened this issue Mar 4, 2021 · 1 comment · Fixed by #1557
Closed

File / FileEditor no history (entries option not working) #1530

mo-han opened this issue Mar 4, 2021 · 1 comment · Fixed by #1557

Comments

@mo-han
Copy link

mo-han commented Mar 4, 2021

class Test(HasTraits):
    p = File(entries=10, dialog_style='open')
class Test(HasTraits):
    p = File(editor=FileEditor(entries=10, dialog_style='open'))

Neither shows the history combo box with entries=10 provided.
Then found out the source code of traitsui.editors.file_editor.FileEditor says:

    #: FIXME: add support
    entries = Int(10)

So does this mean entries option is actually not supported yet? Then why does the official document shows examples of FileEditor with history combo box?

@aaronayres35
Copy link
Contributor

aaronayres35 commented Mar 25, 2021

It looks as though this functionality is supported on the wx backend, but not for qt (hence the example shown in the documentation).
See:

if factory.entries > 0:
from .history_control import HistoryControl
self.history = HistoryControl(
entries=factory.entries, auto_set=factory.auto_set
)

The fact that this is currently a wx specific feature is not at all clear currently and this is a problem. It should be stated in the documentation that currently this feature is only available on wx, as well as in the comment in the source code.
Ultimately we want this functionality on qt as well, but in the mean time it needs to be clearly documented that it is not supported

Also, slightly orthogonal to this issue, the History_demo which showcases this feature is currently broken on wx. Fix coming soon.

Also note that this functionality is supported on qt for the HistoryEditor, but not for the FileEditor or DirectoryEditor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants