-
Notifications
You must be signed in to change notification settings - Fork 815
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
Proposed modifications for the example of "Widgets" #3913
Comments
Hey @jrycw, thanks for opening this issue! We represent As for the event accepting the |
Apparently the remainder of the code also thinks |
See the PR linked above for the resolution of this issue. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
This issue is intended to propose modifications to the example provided in guide/widgets, and the original code can be accessed here.
In reality, the
on_bit_switch_bit_changed
ofByteEditor
receivesBitSwitch.BitChanged
but does not use it. Consequently, there is no need to pass thebit
andvalue
toBitSwitch.BitChanged
while initializing.The
value
(textual.reactive.reactive
) inBitSwitch
appears to indicate the switch status (on/off). Therefore, it seems more natural to usevalue = reactive(False)
instead ofvalue = reactive(0)
.To summarize, I would suggest modifying
BitSwitch
with the following code:The text was updated successfully, but these errors were encountered: