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
Using the Enter or Leave event decorators with a CSS selector throws the following exception:
Traceback (most recent call last):
File "/home/x/Archive/python/2024/textual/enter_leave_css_selector.py", line 9, in <module>
class EnterLeave(App):
File "/home/x/Archive/python/2024/textual/enter_leave_css_selector.py", line 14, in EnterLeave
@on(Enter, "Button")
File "/home/x/.local/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
Using the Enter or Leave event decorators with a CSS selector throws the following exception:
Textual Diagnostics
Versions
Python
Operating System
171834820922.04~7817b67 SMP PREEMPT_DYNAMIC Mon JTerminal
Rich Console options
Example Code
Without the selectors it works fine, but then I have to check within the method if I'm entering or leaving a specific widget I want to act on:
The text was updated successfully, but these errors were encountered: