mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
version bump
This commit is contained in:
@@ -161,6 +161,7 @@ class Calculator(GridView):
|
||||
|
||||
def do_math() -> None:
|
||||
"""Does the math: LEFT OPERATOR RIGHT"""
|
||||
self.log(self.left, self.operator, self.right)
|
||||
try:
|
||||
if self.operator == "+":
|
||||
self.left += self.right
|
||||
@@ -172,7 +173,8 @@ class Calculator(GridView):
|
||||
self.left *= self.right
|
||||
self.display = str(self.left)
|
||||
self.value = ""
|
||||
except ZeroDivisionError:
|
||||
self.log("=", self.left)
|
||||
except Exception:
|
||||
self.display = "Error"
|
||||
|
||||
if button_name.isdigit():
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
from textual import events
|
||||
from textual.app import App
|
||||
|
||||
from textual.views import WindowView
|
||||
from textual.widgets import Placeholder
|
||||
|
||||
|
||||
class MyApp(App):
|
||||
async def on_mount(self, event: events.Mount) -> None:
|
||||
window1 = WindowView(Placeholder(height=20))
|
||||
# window2 = WindowView(Placeholder(height=20))
|
||||
|
||||
# window1.scroll_x = -10
|
||||
# window1.scroll_y = 5
|
||||
|
||||
await self.view.dock(window1, edge="left")
|
||||
|
||||
|
||||
MyApp.run(log="textual.log")
|
||||
Reference in New Issue
Block a user