waitDialog = new WaitDialog(getInstance());
waitDialog = new WaitDialog(getRootFrame());
    public PatchEdit(ArrayList fileList, int debugLevel) {        ErrorMsg.setDebugLevel(debugLevel);        // for bug report        ErrorMsg.reportStatus("JSynthLib: " + Constants.VERSION                + ", Java: " +  Utility.getJavaVersion()                + ", OS: " +  Utility.getOSName() + ", " + Utility.getOSVersion());        // Load synth database (synthdrivers.properties)	devConfig = new DevicesConfig();	// Load config file (JSynthLib.properties).        boolean loadPrefsSuccessfull = AppConfig.loadPrefs();	// define event actions	Actions.createActions();	// Set up the GUI.	JSLDesktop.setGUIMode(AppConfig.getGuiStyle() == AppConfig.GUI_MDI);	desktop = new Actions.MenuDesktop("JSynthLib", Actions.createMenuBar(), Actions.createToolBar(),                Actions.exitAction);	// Show dialog for the 1st invokation.	//This is no longer normal. Maybe we shouldn't save prefs if this happens (could be difficult)        if (!loadPrefsSuccessfull)            ErrorMsg.reportError		("Error",		 "Unable to load user preferences. Defaults loaded instead.");	// popup menu for Library window, etc.	Actions.createPopupMenu();	// set up Preference Dialog Window	prefsDialog = new PrefsDialog(getInstance());        //Set up a silly little dialog we can pop up for the user to        //gawk at while we do time consuming work later on.        waitDialog = new WaitDialog(getInstance());        // Start pumping MIDI information from Input --> Output so the        // user can play a MIDI Keyboard and make pretty music	masterInEnable(AppConfig.getMasterInEnable());	// open library frame specified on the command line argument.	Iterator it = fileList.iterator();	while (it.hasNext()) {	    String fname = (String) it.next();	    ErrorMsg.reportStatus("file name: " + fname);	    Actions.openFrame(new File(fname));	}    }