Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d05e181

Browse files
committed
Slightly better error message in case of missing resources.
1 parent d5f4359 commit d05e181

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Mac/Lib/EasyDialogs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def Message(msg, id=260, ok=None):
5050

5151
d = GetNewDialog(id, -1)
5252
if not d:
53-
print "Can't get DLOG resource with id =", id
53+
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
5454
return
5555
h = d.GetDialogItemAsControl(2)
5656
SetDialogItemText(h, lf2cr(msg))
@@ -81,7 +81,7 @@ def AskString(prompt, default = "", id=261, ok=None, cancel=None):
8181

8282
d = GetNewDialog(id, -1)
8383
if not d:
84-
print "Can't get DLOG resource with id =", id
84+
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
8585
return
8686
h = d.GetDialogItemAsControl(3)
8787
SetDialogItemText(h, lf2cr(prompt))
@@ -121,7 +121,7 @@ def AskPassword(prompt, default='', id=264, ok=None, cancel=None):
121121
"""
122122
d = GetNewDialog(id, -1)
123123
if not d:
124-
print "Can't get DLOG resource with id =", id
124+
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
125125
return
126126
h = d.GetDialogItemAsControl(3)
127127
SetDialogItemText(h, lf2cr(prompt))
@@ -163,7 +163,7 @@ def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262
163163

164164
d = GetNewDialog(id, -1)
165165
if not d:
166-
print "Can't get DLOG resource with id =", id
166+
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
167167
return
168168
# Button assignments:
169169
# 1 = default (invisible)
@@ -393,7 +393,7 @@ def _selectoption(d, optionlist, idx):
393393
def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID):
394394
d = GetNewDialog(id, -1)
395395
if not d:
396-
print "Can't get DLOG resource with id =", id
396+
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
397397
return
398398
# h = d.GetDialogItemAsControl(3)
399399
# SetDialogItemText(h, lf2cr(prompt))

0 commit comments

Comments
 (0)