summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-07-17 13:25:15 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-07-17 13:25:15 (GMT)
commite4b4038cb20f47d5fd8a3f165bdcf9ef930e8f99 (patch)
tree8a6614c29fea321ec17fd273e51ddaa699921e19 /Mac
parentbc608646a88bada9bee0ba2b66964e69777f564a (diff)
downloadcpython-e4b4038cb20f47d5fd8a3f165bdcf9ef930e8f99.zip
cpython-e4b4038cb20f47d5fd8a3f165bdcf9ef930e8f99.tar.gz
cpython-e4b4038cb20f47d5fd8a3f165bdcf9ef930e8f99.tar.bz2
Various toolbox routines have gotten new names.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/EasyDialogs.py24
-rw-r--r--Mac/Lib/FrameWork.py6
2 files changed, 15 insertions, 15 deletions
diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py
index 41edd7e..dc668b0 100644
--- a/Mac/Lib/EasyDialogs.py
+++ b/Mac/Lib/EasyDialogs.py
@@ -9,7 +9,7 @@ This module uses DLOG resources 256, 257 and 258.
Based upon STDWIN dialogs with the same names and functions.
"""
-from Dlg import GetNewDialog, SetIText, GetIText, ModalDialog
+from Dlg import GetNewDialog, SetDialogItemText, GetDialogItemText, ModalDialog
def Message(msg):
@@ -25,8 +25,8 @@ def Message(msg):
if not d:
print "Can't get DLOG resource with id =", id
return
- tp, h, rect = d.GetDItem(2)
- SetIText(h, msg)
+ tp, h, rect = d.GetDialogItem(2)
+ SetDialogItemText(h, msg)
while 1:
n = ModalDialog(None)
if n == 1:
@@ -51,16 +51,16 @@ def AskString(prompt, default = ""):
if not d:
print "Can't get DLOG resource with id =", id
return
- tp, h, rect = d.GetDItem(3)
- SetIText(h, prompt)
- tp, h, rect = d.GetDItem(4)
- SetIText(h, default)
- d.SelIText(4, 0, 255)
+ tp, h, rect = d.GetDialogItem(3)
+ SetDialogItemText(h, prompt)
+ tp, h, rect = d.GetDialogItem(4)
+ SetDialogItemText(h, default)
+# d.SetDialogItem(4, 0, 255)
while 1:
n = ModalDialog(None)
if n == 1:
- tp, h, rect = d.GetDItem(4)
- return GetIText(h)
+ tp, h, rect = d.GetDialogItem(4)
+ return GetDialogItemText(h)
if n == 2: return None
@@ -88,8 +88,8 @@ def AskYesNoCancel(question, default = 0):
# 3 = No
# 4 = Cancel
# The question string is item 5
- tp, h, rect = d.GetDItem(5)
- SetIText(h, question)
+ tp, h, rect = d.GetDialogItem(5)
+ SetDialogItemText(h, question)
while 1:
n = ModalDialog(None)
if n == 1: return default
diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py
index 3e60f70..d1592ed 100644
--- a/Mac/Lib/FrameWork.py
+++ b/Mac/Lib/FrameWork.py
@@ -5,7 +5,7 @@ import MacOS
import traceback
from addpack import addpack
-addpack('Demo')
+addpack('Tools')
addpack('bgen')
addpack('ae')
#addpack('ctl')
@@ -377,7 +377,7 @@ class Menu:
self.menu.AppendMenu('x') # add a dummy string
self.items.append(label, shortcut, callback, kind)
item = len(self.items)
- self.menu.SetItem(item, label) # set the actual text
+ self.menu.SetMenuItemText(item, label) # set the actual text
if shortcut:
self.menu.SetItemCmd(item, ord(shortcut))
return item
@@ -429,7 +429,7 @@ class AppleMenu(Menu):
Menu.__init__(self, bar, "\024")
self.additem(abouttext, None, aboutcallback)
self.addseparator()
- self.menu.AddResMenu('DRVR')
+ self.menu.AppendResMenu('DRVR')
def dispatch(self, id, item, window, event):
if item == 1: