bool checkViewAvailability(string mMV, Module cM) { bool vWF = null //vWF = 'viewWasFound' //Debug print "Begin view-loop \n" string v for v in views(cM) do //cM = 'currentModule' { if(mMV == v) //mMV = 'myMainView' { setDefaultViewForModule(cM, mMV) //The view could only be set in the module, if the module is already opened in the GUI vWF = true //Debug print "viewWasFound: " vWF "\n" print "myMainView: " mMV "\n" break } else { setDefaultViewForModule(cM, getDefaultViewForModule(cM)) //The view could only be set in the module, if the module is already opened in the GUI vWF = false //Debug print "viewWasFound: " vWF "\n" } } return vWF }