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

Bugfix: pressing arrows generates AttributeError #222

Merged

Conversation

tomhea
Copy link
Contributor

@tomhea tomhea commented Oct 6, 2023

More info about the bug: I used the easygui.enterbox, and while pressing the left/right/up/down arrows - easygui generated these weird errors to me:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\tomhe\AppData\Local\Programs\Python\Python311\Lib\tkinter\__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\tomhe\AppData\Local\Programs\Python\Python311\Lib\site-packages\easygui\boxes\base_boxes.py", line 23, in tabRight
    boxRoot.event_generate("<Tab>")
    ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'event_generate'

It seems like the exact problem in #170.

This Pull Request is a solution to that problem. I tested it and it works for me.
It's only two new ifs to the codebase so it should be very simple to verify.

I also strongly believe that this bugfix should be deployed now by creating version 0.98.4 (I know I would love to use this library with the fixed bug).

@zadacka
Copy link
Collaborator

zadacka commented Oct 7, 2023

Hi Tom, thanks for the bug report and the PR. It’s frustrating that there is a condition in which ‘boxRoot’ is none - so it may be that we’re masking a problem by checking it at this point.

That said - the fix you have here is nicely minimal and looks to do exactly what you’ve described.

I can review / approve now (on mobile) but am travelling so can’t rebuild a point version until I’m back with proper PC access - so getting a patched version out may take a few days. Hope that’s ok - and thank you for your input!

@zadacka zadacka merged commit 622bd64 into robertlugg:master Oct 7, 2023
@tomhea
Copy link
Contributor Author

tomhea commented Nov 18, 2023

Hi, is there a chance that you can rebuild a new version? :)

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