You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromtextualimportonfromtextual.appimportApp, ComposeResultfromtextual.widgetsimportHeader, SelectLINES="""I must not fear.Fear is the mind-killer.Fear is the little-death that brings total obliteration.I will face my fear.I will permit it to pass over me and through me.""".splitlines()
classSelectApp(App):
defcompose(self) ->ComposeResult:
yieldHeader()
yieldSelect(((line, line) forlineinLINES), id="line")
@on(Select.Changed, "#line")defselect_changed(self, event: Select.Changed) ->None:
self.title=str(event.value)
if__name__=="__main__":
app=SelectApp()
app.run()
Causes:
Traceback (most recent call last):
File "/home/dave/ng/textual-select-on.py", line 12, in <module>
class SelectApp(App):
File "/home/dave/ng/textual-select-on.py", line 17, in SelectApp
@on(Select.Changed, "#line")
File "/home/dave/.pyenv/versions/ng/lib/python3.10/site-packages/textual/_on.py", line 69, in on
raise OnDecoratorError(
textual._on.OnDecoratorError: The message class must have a 'control' to match with the on decorator
Building upon this, but adding
#line
selector:Causes:
Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
The text was updated successfully, but these errors were encountered: