summaryrefslogtreecommitdiffstats
path: root/Mac/Lib/test/ttedit.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-04-11 15:40:32 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-04-11 15:40:32 (GMT)
commitc9c0dd34203a9ebb6b24b8dd922b762bf2995b7a (patch)
tree8a97490c05a223af3adf121454a991197fb93d52 /Mac/Lib/test/ttedit.py
parentcef2c597fec211a708954a6d934d5ae708b1a61d (diff)
downloadcpython-c9c0dd34203a9ebb6b24b8dd922b762bf2995b7a.zip
cpython-c9c0dd34203a9ebb6b24b8dd922b762bf2995b7a.tar.gz
cpython-c9c0dd34203a9ebb6b24b8dd922b762bf2995b7a.tar.bz2
Fixed ttedit to actually work
Fixed minor update bug in tlist
Diffstat (limited to 'Mac/Lib/test/ttedit.py')
-rw-r--r--Mac/Lib/test/ttedit.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/Mac/Lib/test/ttedit.py b/Mac/Lib/test/ttedit.py
index 59e250d..a4cd774 100644
--- a/Mac/Lib/test/ttedit.py
+++ b/Mac/Lib/test/ttedit.py
@@ -19,6 +19,7 @@ class TEWindow(Window):
r2 = (0, 0, 345, 245)
Qd.SetPort(w)
self.ted = TE.TENew(r2, r2)
+ self.ted.TEAutoView(1)
w.DrawGrowIcon()
self.wid = w
self.do_postopen()
@@ -32,21 +33,16 @@ class TEWindow(Window):
else:
self.ted.TEDeactivate()
- def do_rawupdate(self, window, event):
- window.BeginUpdate()
- self.do_update(window, event)
- window.EndUpdate()
-
- def do_update(self, *args):
- Qd.EraseRect(self.wid.GetWindowPort().portRect)
- self.ted.TEUpdate(self.wid.GetWindowPort().portRect)
+ def do_update(self, wid, event):
+ Qd.EraseRect(wid.GetWindowPort().portRect)
+ self.ted.TEUpdate(wid.GetWindowPort().portRect)
def do_contentclick(self, local, modifiers, evt):
shifted = (modifiers & 0x200)
self.ted.TEClick(local, shifted)
def do_char(self, ch, event):
- self.ted.TEKey(ch)
+ self.ted.TEKey(ord(ch))
class TestList(Application):
def __init__(self):