diff options
Diffstat (limited to 'Mac/Lib/test')
-rw-r--r-- | Mac/Lib/test/progressbar.py | 10 | ||||
-rw-r--r-- | Mac/Lib/test/tctl.py | 3 | ||||
-rw-r--r-- | Mac/Lib/test/tdlg.py | 7 |
3 files changed, 13 insertions, 7 deletions
diff --git a/Mac/Lib/test/progressbar.py b/Mac/Lib/test/progressbar.py index 59e0cc1..e165061 100644 --- a/Mac/Lib/test/progressbar.py +++ b/Mac/Lib/test/progressbar.py @@ -1,12 +1,12 @@ # Progress dialog from addpack import addpack -addpack('Demo') +addpack('Tools') addpack('bgen') addpack('dlg') addpack('evt') -from Dlg import GetNewDialog, ModalDialog, SetIText +from Dlg import GetNewDialog, ModalDialog, SetDialogItemText count = 0 @@ -17,12 +17,12 @@ def filter(d, e): def main(): d = GetNewDialog(256, -1) - tp, h, rect = d.GetDItem(2) - SetIText(h, "Progress...") + tp, h, rect = d.GetDialogItem(2) + SetDialogItemText(h, "Progress...") for i in range(100): if i%10 == 0: str = "Progress...%d" % i - SetIText(h, str) + SetDialogItemText(h, str) ModalDialog(filter) for j in range(100): pass diff --git a/Mac/Lib/test/tctl.py b/Mac/Lib/test/tctl.py index 862eeb5..a255c56 100644 --- a/Mac/Lib/test/tctl.py +++ b/Mac/Lib/test/tctl.py @@ -5,6 +5,7 @@ from Ctl import * from Win import * from Evt import * import time +import sys def main(): r = (40, 40, 400, 300) @@ -12,6 +13,8 @@ def main(): w.DrawGrowIcon() r = (40, 40, 100, 60) c = NewControl(w, r, "SPAM!", 1, 0, 0, 1, 0, 0) + print 'Ok, try it...' + sys.exit(1) # So we can see what happens... main() diff --git a/Mac/Lib/test/tdlg.py b/Mac/Lib/test/tdlg.py index d6fdd97..654a9a5 100644 --- a/Mac/Lib/test/tdlg.py +++ b/Mac/Lib/test/tdlg.py @@ -3,6 +3,9 @@ # Python library. # The ID can be overridden by passing a second parameter. +import addpack +addpack.addpack(':Tools:bgen:evt') + from Dlg import * from Events import * import string @@ -17,8 +20,8 @@ def f(d, event): def message(str = "Hello, world!", id = ID): d = GetNewDialog(id, -1) - tp, h, rect = d.GetDItem(2) - SetIText(h, str) + tp, h, rect = d.GetDialogItem(2) + SetDialogItemText(h, str) while 1: n = ModalDialog(f) if n == 1: break |