from Carbon import Ctl
from Carbon import Controls
from Carbon import Menu
+from Carbon import AE
import Nav
import MacOS
import string
global _initialized
if _initialized: return
macresource.need("DLOG", 260, "dialogs.rsrc", __name__)
-
+
+def _interact():
+ """Make sure the application is in the foreground"""
+ AE.AEInteractWithUser(50000000)
def cr2lf(text):
if '\r' in text:
The MESSAGE string can be at most 255 characters long.
"""
_initialize()
+ _interact()
d = GetNewDialog(id, -1)
if not d:
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
"""
_initialize()
+ _interact()
d = GetNewDialog(id, -1)
if not d:
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
can be at most 255 characters long.
"""
_initialize()
+ _interact()
d = GetNewDialog(id, -1)
if not d:
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
"""
_initialize()
+ _interact()
d = GetNewDialog(id, -1)
if not d:
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID):
_initialize()
+ _interact()
d = GetNewDialog(id, -1)
if not d:
print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
message=message,preferenceKey=preferenceKey,
popupExtension=popupExtension,eventProc=eventProc,previewProc=previewProc,
filterProc=filterProc,typeList=typeList,wanted=wanted,multiple=multiple)
+ _interact()
try:
rr = Nav.NavChooseFile(args)
good = 1
savedFileName=savedFileName,message=message,preferenceKey=preferenceKey,
popupExtension=popupExtension,eventProc=eventProc,fileType=fileType,
fileCreator=fileCreator,wanted=wanted,multiple=multiple)
+ _interact()
try:
rr = Nav.NavPutFile(args)
good = 1
message=message,preferenceKey=preferenceKey,
popupExtension=popupExtension,eventProc=eventProc,filterProc=filterProc,
wanted=wanted,multiple=multiple)
+ _interact()
try:
rr = Nav.NavChooseFolder(args)
good = 1