if response == True: try: os.mkdir(app.tempdir) except: dabo.ui.exclaim('Unable to create a temp directory!!') sys.exit(1) else: dabo.ui.exclaim("Hey, I really need a directory to write stuff! That's it, I quit!") sys.exit() app.MainFormClass = app.ui.FrmMain app.PreferenceManager.setValue("fontsize", 11) app.NoneDisplay = "" # Set up a global connection to the database that all bizobjs will share: app.dbConnectionName = "monro_user" app.dbConnection = app.getConnectionByName(app.dbConnectionName) #app.dbConnection.LogEvents = ['All'] # Open one or more of the defined forms. A default one was picked by the app # generator, but you can change that here. Additionally, if form names were # passed on the command line, they will be opened instead of the default one # as long as they exist. app.ui.AnswersForm = dabo.ui.createClass("ui" + os.sep + "AnswersForm.cdxml") app.ui.AttachmentsForm = dabo.ui.createClass("ui" + os.sep + "AttachmentsForm.cdxml") app.ui.CommentsForm = dabo.ui.createClass("ui" + os.sep + "CommentsForm.cdxml") app.ui.ContactsForm = dabo.ui.createClass("ui" + os.sep + "ContactsForm.cdxml") app.ui.GetFilesForContactForm = dabo.ui.createClass("ui" + os.sep + "GetFilesForContactForm.cdxml") app.ui.GradesForm = dabo.ui.createClass("ui" + os.sep + "GradesForm.cdxml") app.ui.LessonsForm = dabo.ui.createClass("ui" + os.sep + "LessonsForm.cdxml")
print "response = ;" + str(response) + ";" app.BaseDir = response app.PreferenceManager.setValue("basedir", app.BaseDir) if app.BaseDir: app.tempdir = str(os.path.join(app.BaseDir, 'tmp')) if not os.path.exists(app.tempdir): try: os.mkdir(app.tempdir) except: dabo.ui.exclaim('Unable to create a temp directory!!') app.MainFormClass = app.ui.FrmMain app.PreferenceManager.setValue("fontsize", 11) app.NoneDisplay = "" # Set up a global connection to the database that all bizobjs will share: app.dbConnectionName = "wbs_test_user" app.dbConnection = app.getConnectionByName(app.dbConnectionName) #app.dbConnection.LogEvents = ['All'] # Open one or more of the defined forms. A default one was picked by the app # generator, but you can change that here. Additionally, if form names were # passed on the command line, they will be opened instead of the default one # as long as they exist. app.ui.AnswersForm = dabo.ui.createClass("ui" + os.sep + "AnswersForm.cdxml") app.ui.AttachmentsForm = dabo.ui.createClass("ui" + os.sep + "AttachmentsForm.cdxml") app.ui.CommentsForm = dabo.ui.createClass("ui" + os.sep + "CommentsForm.cdxml") app.ui.ContactsForm = dabo.ui.createClass("ui" + os.sep + "ContactsForm.cdxml") app.ui.GetFilesForContactForm = dabo.ui.createClass("ui" + os.sep + "GetFilesForContactForm.cdxml") app.ui.GradesForm = dabo.ui.createClass("ui" + os.sep + "GradesForm.cdxml") app.ui.LessonsForm = dabo.ui.createClass("ui" + os.sep + "LessonsForm.cdxml")