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

Modified WinForms backend to prevent error when window content is not set. #2095

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

proneon267
Copy link
Contributor

@proneon267 proneon267 commented Aug 23, 2023

Modified WinForms backend to prevent error when window content is not set.

Prevents non meaningful error messages like the following from showing up:

...
  File "...\winforms\src\toga_winforms\window.py", line 124, in show
    self.interface.content.refresh()
AttributeError: 'NoneType' object has no attribute 'refresh'

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@proneon267 proneon267 changed the title Added meaningful empty window content error messages. Modified WinForms backend to prevent error when window content is not set. Aug 23, 2023
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable.

As an aside - while these bug fixes to Windows are great, they should all be picked up as part of #2058 being completed, and that PR includes automated tests of behavior.

@freakboy3742 freakboy3742 merged commit 01b076b into beeware:main Aug 24, 2023
40 checks passed
@proneon267 proneon267 deleted the patch-14 branch August 24, 2023 07:29
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.

2 participants