Closed voryzen closed 2 years ago
I can't reproduce this behavior.
Using v0.1.4
I can use the example scripts without any exception.
Could you also paste the error type? You just provided the traceback. And do you have any code to be tested? In order to reproduce the error.
the only error output I get is:
KeyError: 5
I am getting this error, when I run my own local program that I'm building with py_cui.
Its local code, not a program installed with pip
I set a cycle widget key in my program, maybe that's where it is coming from.
aka.
root.set_widget_cycle_key(forward_cycle_key=py_cui.keys.KEY_TAB, reverse_cycle_key=None)
Ok, root.set_widget_cycle_key(forward_cycle_key=py_cui.keys.KEY_TAB, reverse_cycle_key=None)
helped me to reproduce the behavior.
That was indeed a bug, just pushed a PR to fix it :wink:
Awesome @PabloLec Terrific work
Does this fix #121 ?
Awesome @PabloLec Terrific work
Does this fix #121 ?
Yes indeed! I didn't see that issue. Good call, I'll add it in the PR.
Thanks.
What about #116 ?
It may not be fixed, but it's certainly related
Thanks.
What about #116 ?
It may not be fixed, but it certainly related
Not this one :smile:
This one should be closed by the way as it was resolved by #125
When cycling through widgets, status_bar
get refreshed at some point which is expected behavior. Here, the user set status_bar
to None
in order to hide it. That caused an exception obviously.
status_bar
, .show()
and .hide()
which will avoid the need to unset it. So now I guess raising an exception when status_bar
is None is acceptable as there is no reason it should be.Ahh, right. Thanks for the info. It is helpful; I haven't coded with python before now
Great to begin with a TUI :smiley: I also created my first open-source Python project that way.
That's cool.
I'm almost finished my first iteration with this project. I just need to work out how to 'turn off' the CUI temporarily, and I'll be able to finish it and push.
I won't say much more here, I'm trying not to hijack the thread
Updated to v0.1.4
Shifting focus through widgets, first cycle is fine, however py_cui program crashes and returns this error upon the second cycle.
self.get_widgets()[next_widget_num] is None.
Terminal shows this after crash
Any ideas? @PabloLec