Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
✨ Example code for Textualize/textual#3633
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Nov 3, 2023
1 parent 444eddc commit 6b1dc3c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions command_palette_isolation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""https://github.com/Textualize/textual/issues/3633"""

from textual.app import App, ComposeResult
from textual.widgets import Log

class CommandPaletteIsolation(App[None]):

def compose(self) -> ComposeResult:
yield Log()

def tick(self) -> None:
self.query_one(Log).write_line("Tick")

def on_mount(self) -> None:
self.set_interval(1, self.tick)

if __name__ == "__main__":
CommandPaletteIsolation().run()

### command_palette_isolation.py ends here

0 comments on commit 6b1dc3c

Please sign in to comment.