diff --git a/docs/examples/app/widgets03.py b/docs/examples/app/widgets03.py index 7c3ca21e1..1063b6477 100644 --- a/docs/examples/app/widgets03.py +++ b/docs/examples/app/widgets03.py @@ -5,7 +5,7 @@ from textual.widgets import Button, Welcome class WelcomeApp(App): def on_key(self) -> None: self.mount(Welcome()) - self.query_one(Button).label = "YES" + self.query_one(Button).label = "YES!" if __name__ == "__main__": diff --git a/docs/examples/app/widgets04.py b/docs/examples/app/widgets04.py index 90eecbda9..7eb6b25c6 100644 --- a/docs/examples/app/widgets04.py +++ b/docs/examples/app/widgets04.py @@ -5,7 +5,7 @@ from textual.widgets import Button, Welcome class WelcomeApp(App): async def on_key(self) -> None: await self.mount(Welcome()) - self.query_one(Button).label = "YES" + self.query_one(Button).label = "YES!" if __name__ == "__main__": diff --git a/docs/guide/app.md b/docs/guide/app.md index 12b63da0f..5a5a48265 100644 --- a/docs/guide/app.md +++ b/docs/guide/app.md @@ -125,7 +125,7 @@ This may be a problem if you want to make any changes to the widget in the same Let's first illustrate the problem with an example. The following code will mount the Welcome widget in response to a key press. -It will also attempt to modify the Button in the Welcome widget by changing its label from "OK" to "YES". +It will also attempt to modify the Button in the Welcome widget by changing its label from "OK" to "YES!". ```python hl_lines="2 8" from textual.app import App @@ -173,7 +173,6 @@ Here's the output. Note the changed button text: ```{.textual path="docs/examples/app/widgets04.py" press=["a"]} ``` - ## Exiting An app will run until you call [App.exit()][textual.app.App.exit] which will exit application mode and the [run][textual.app.App.run] method will return. If this is the last line in your code you will return to the command prompt.