-
Notifications
You must be signed in to change notification settings - Fork 616
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
Canvas show=True doesn't work #39
Comments
Yeah, I found this too. show=True only really works when you are not subclassing Canvas. How do other toolkits deal with this? I would be surprised if the deffered the showing till the app is run. A solution (I think) is to do the Canvas.init(self) at the end of your new init. |
atom.py now demonstrates how you would do this. Dereferencing the showing until the app is run is non-trivial at best. |
I think it is not really fixed even though the atom example show a workaround. |
But I do not think it is a bug of vispy. This behaviour is inherent to how window creation works. In theory, we could keep a list of windows-to-show on the app. The Canvas can add itself to the list. On app.run() all canvas objects in the list are shown. However, this will fail if a Canvas is created while the mainloop is running, for instance when a button is pressed and a popup with a visualization is shown. |
But this means we cannot make the windows visible by default, no ? On Aug 29, 2013, at 10:22 AM, Almar Klein notifications@github.com wrote:
|
We can, but when subclassing Canvas, you need to take into account that the call to And this should also just work:
And so does this:
|
Ok, great. I think we can close it. Nicolas On Aug 29, 2013, at 11:24 AM, Almar Klein notifications@github.com wrote:
|
Take the examples/atom.py and tries:
app.Canvas.init(self, show=True)
The window is immediately shown while my canvas initalization is not yet finished. Showing the canvas should be deferred until the app is ran.
The text was updated successfully, but these errors were encountered: