-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Viewer return values only work on certain backends #1056
Comments
fyi, there are known issues with the event loop on mac osx (as in it works differently than every where else) |
@tacaswell the implication being that this will only ever work on the OSX backend? |
I will try to come over and sprint with you guys. Naively I would have expected the opposite, I need to look at this code before I say anything else. |
Building Javascript widgets for IPython may be the most productive route in the long run. |
That said, there are some tasks that are currently fairly simple (such as moving around lines in image coordinate space), that may not be so obvious that way. You can no longer rely on matplotlib to handle events etc. then, so you need a whole new custom javascript layer on top. |
Not all of us welcome our new javascript overlords with open arms ;) |
Closing following #6160. |
@tonysyu and I hashed this out two days ago while preparing for the tutorials. Basically, some backends go through a lot of trouble to make the viewer call non-blocking, in which case, the returned object contains just the original, uninitialized values!
At the very least, this should be documented. At best, we need to rethink this interface to make it work on asynchronous backends. (Aside: @tonysyu is reluctant to do this because he would rather spend more effort on reproducing the viewer stuff using IPython widgets.)
Here's some code to reproduce the bug. It works with the MacOSX backend, but not Qt. Others are untested.
This will show the updated value if the call to
view.show
was blocking, but the original middle line if it was non-blocking.The text was updated successfully, but these errors were encountered: