DOC_MAIN_CLASS
.getUi().showModelessDialog(hOutput,theTitle);
var DOC_MAIN_CLASS;//Define global but dont assign it a value
function setDocMainClass_() {
//Only set a global from inside of a function or there may be an error
if (!DOC_MAIN_CLASS) {
DOC_MAIN_CLASS = FormApp;//Or whatever xxxxApp
}
}
setDocMainClass_();//Runs this function every time that any code runs