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

1.0: WCheckBox, WRadioButton, WListBox, WDropDown now inherit from ChoiceWidget #25

Open
pfalcon opened this issue Jan 14, 2018 · 5 comments

Comments

@pfalcon
Copy link
Owner

pfalcon commented Jan 14, 2018

As an outcome of #13 , a more structure class hierarchy introduced, with ChoiceWidget abstract base class, which says that any subclass should maintain a value chosen (selected) by user as self.choice. Thus, before:

WCheckBox.state
WRadioButton.selected
WListBox.cur_line
WDropDown.choice

after:

WCheckBox.choice
WRadioButton.choice
WListBox.choice
WDropDown.choice
@pfalcon
Copy link
Owner Author

pfalcon commented Jan 14, 2018

Last commit before this change: ce406c1
First commit after this change: 7b35dc3

@pfalcon
Copy link
Owner Author

pfalcon commented Jan 15, 2018

This refactor is now in master.

@fiee
Copy link

fiee commented Jan 19, 2018

Please update your examples, e.g. if I run example_widgets.py and check "Prefix" in the dropdown, I get:

File ".../picotui/widgets.py", line 511, in is_prefix_changed choices = main.get_choices(main.get_text(), wid.state) AttributeError: 'WCheckbox' object has no attribute 'state'

@pfalcon
Copy link
Owner Author

pfalcon commented Jan 19, 2018

Examples are definitely get updated, e.g. 49c2d12. Not everything is spotted at once, so help with testing is appreciated. This issue has been fixed.

@fiee
Copy link

fiee commented Jan 19, 2018

You’re fast ;) Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants