unified events and messages

This commit is contained in:
Will McGugan
2022-08-10 13:09:38 +01:00
parent d6079deb90
commit b3eb543e38
23 changed files with 137 additions and 230 deletions

View File

@@ -27,7 +27,7 @@ class ButtonsApp(App[str]):
Button("There can be only one"),
)
def handle_pressed(self, event: Button.Pressed) -> None:
def on_button_pressed(self, event: Button.Pressed) -> None:
self.app.bell()
async def on_key(self, event: events.Key) -> None:
@@ -38,7 +38,7 @@ class ButtonsApp(App[str]):
app = ButtonsApp(
log_path="textual.log", css_path="buttons.css", watch_css=True, log_verbosity=2
log_path="textual.log", css_path="buttons.css", watch_css=True, log_verbosity=3
)
if __name__ == "__main__":