]> granicus.if.org Git - python/commitdiff
Slightly better error message in case of missing resources.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 2 Aug 2002 11:03:19 +0000 (11:03 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 2 Aug 2002 11:03:19 +0000 (11:03 +0000)
Mac/Lib/EasyDialogs.py

index 394e9123d36e049d3c588dc7b136f4b44510b3ce..52aad9791d9efdb1c85df5bd00bbe3e0dd78a284 100644 (file)
@@ -50,7 +50,7 @@ def Message(msg, id=260, ok=None):
        
        d = GetNewDialog(id, -1)
        if not d:
-               print "Can't get DLOG resource with id =", id
+               print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
                return
        h = d.GetDialogItemAsControl(2)
        SetDialogItemText(h, lf2cr(msg))
@@ -81,7 +81,7 @@ def AskString(prompt, default = "", id=261, ok=None, cancel=None):
        
        d = GetNewDialog(id, -1)
        if not d:
-               print "Can't get DLOG resource with id =", id
+               print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
                return
        h = d.GetDialogItemAsControl(3)
        SetDialogItemText(h, lf2cr(prompt))
@@ -121,7 +121,7 @@ def AskPassword(prompt,      default='', id=264, ok=None, cancel=None):
        """
        d = GetNewDialog(id, -1)
        if not d:
-               print "Can't get DLOG resource with id =", id
+               print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
                return
        h = d.GetDialogItemAsControl(3)
        SetDialogItemText(h, lf2cr(prompt))     
@@ -163,7 +163,7 @@ def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262
        
        d = GetNewDialog(id, -1)
        if not d:
-               print "Can't get DLOG resource with id =", id
+               print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
                return
        # Button assignments:
        # 1 = default (invisible)
@@ -393,7 +393,7 @@ def _selectoption(d, optionlist, idx):
 def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID):
        d = GetNewDialog(id, -1)
        if not d:
-               print "Can't get DLOG resource with id =", id
+               print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
                return
 #      h = d.GetDialogItemAsControl(3)
 #      SetDialogItemText(h, lf2cr(prompt))