Skip to content

Commit

Permalink
MAINT:add comment to explain the example as wx only (#2020)
Browse files Browse the repository at this point in the history
The traitsui/examples/tutorials/traitsui_4.0/editors/animated_gif.py
will generate a RuntimeError: Importing from wx backend after selecting
qt backend!. The cause of this error comes from
assert_toolkit_import(["wx"]) in traitsui/traitsui/toolkit.py. Althought
removing this line can suppress this problem, this demo is supposed to
be wx only, thus I push this PR to add the message. closes #2016

**Checklist**
- [x] Add a news fragment if this PR is news-worthy for end users. (see
docs/releases/README.rst) (Not really, just a reminder of backend usage)

Co-authored-by: Chengyu Liu <[email protected]>
  • Loading branch information
homosapien-lcy and Chengyu Liu authored May 10, 2023
1 parent b9773d3 commit 8685e6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/tutorials/traitsui_4.0/editors/animated_gif.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
The value associated with **AnimatedGIFEditor** should be the name of the
animated GIF image file to be displayed. No user editing of the value is
provided by this editor, it is display only.
Notes:
- This demo only works on the wx backend.
"""

# --[Imports]--------------------------------------------------------------
Expand Down

0 comments on commit 8685e6a

Please sign in to comment.