-
Notifications
You must be signed in to change notification settings - Fork 95
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
EnumEditor unable to deduce allowed values from Enum trait #726
Comments
I think a lot of this is because the default https://github.com/enthought/traits/blob/master/traits/trait_types.py#L2016-L2022 You need to replicate a lot of that to get the same behaviour from a custom one; in particular, you can't assume that this |
The general rule is that when you specify the The way that information gets transferred from the trait declaration to an editor is when no |
Interesting! For my understanding, may I ask where is this |
It's called in the which is in turn called in the traitsui/traitsui/qt4/ui_panel.py Line 843 in e032bcc
|
To reproduce:
We get this error:
If I remove this line and let traitsui cleverly guess the editor:
Then the UI can be launched with the expected behaviour.
Similarly, if I have the allowed values in a separate trait, this raises the same error
I need to do this instead:
Given the
name_list
trait already specifies where the allowed values come from, it seems unnecessary to have to tell the editor again.The text was updated successfully, but these errors were encountered: