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

TableEditor: initialise events with is_event=True #2041

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

chnce
Copy link
Contributor

@chnce chnce commented Jan 15, 2024

Checklist

  • Initialise Events in TableEditor with is_event=True in order to avoid the error below in "sync_value"
  File "/Users/nino/Repos/traitsui/traitsui/editor.py", line 513, in raise_to_debug
    yield
  File "/Users/nino/Repos/traitsui/traitsui/editor.py", line 398, in sync_value
    editor_value = xgetattr(self, editor_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nino/micromamba/envs/more_pyside/lib/python3.11/site-packages/traits/trait_base.py", line 319, in xgetattr
    return getattr(object, names[-1])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: The dclick trait of a TableEditor instance is an 'event', which is write only.

@corranwebster
Copy link
Contributor

Thanks for the error report and contribution. Assuming that the tests pass this looks basically OK.

It looks like there may be a corresponding error in the Wx version of the code:

sv = self.sync_value
is_list = mode[-1] == "s"
sv(factory.click, "click", "to")
sv(factory.dclick, "dclick", "to")

@corranwebster corranwebster merged commit b728d60 into enthought:main Jan 16, 2024
20 checks passed
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 this pull request may close these issues.

None yet

2 participants