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

Non-functioning code in the "Open with" and single instancing section. #19

Open
thechosenzendro opened this issue May 16, 2023 · 1 comment

Comments

@thechosenzendro
Copy link

I have been following this tutorial to make my side project and it has been very helpful. But the code
if not self.win: in the "Open with" and single instancing section gave me an error AttributeError: 'App' object has no attribute 'win'.. My understanding is i should use hasattr() instead?

@Taiko2k
Copy link
Owner

Taiko2k commented May 16, 2023

In that example I added self.win = None to the applications init method. If you don't and try test for an attribute that hasn't yet been declared on the object you get that error. (I admit the way I formatted the tutorial there is a bit backward)

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

No branches or pull requests

2 participants