version bump

This commit is contained in:
Will McGugan
2021-08-06 12:36:03 +01:00
parent 2ded0fa54b
commit 07f95f96de
5 changed files with 32 additions and 29 deletions

View File

@@ -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():

View File

@@ -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")