rem: top.errorStr = Components.classes["component: 
add: top.errorStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(); 
context: function ImportDialogOKButton(){	var tree = document.getElementById('moduleList');  var deck = document.getElementById("stateDeck");  var header = document.getElementById("header");  var progressMeterEl = document.getElementById("progressMeter");  var progressStatusEl = document.getElementById("progressStatus");  var progressTitleEl = document.getElementById("progressTitle");  // better not mess around with navigation at this point  var nextButton = document.getElementById("forward");  nextButton.setAttribute("disabled", "true");  var backButton = document.getElementById("back");  backButton.setAttribute("disabled", "true");  	if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )	{		var index = tree.selectedItems[0].getAttribute('list-index');		var module = top.importService.GetModule( top.importType, index);		var name = top.importService.GetModuleName( top.importType, index);		top.selectedModuleName = name;		if (module) 		{			switch( top.importType )			{				case "mail":					top.successStr = Components.classes["component://netscape/supports-wstring"].createInstance();					if (top.successStr) {						top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsWString);					}					top.errorStr = Components.classes["component://netscape/supports-wstring"].createInstance();					if (top.errorStr)						top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsWString);										if (ImportMail( module, top.successStr, top.errorStr) == true) 					{						// We think it was a success, either, we need to 						// wait for the import to finish						// or we are done!						if (top.progressInfo.importInterface == null) {							ShowImportResults(true, 'Mail');							return( true);						}						else {							var meterText = GetFormattedBundleString('MailProgressMeterText', name);              header.setAttribute("description", meterText);                            progressStatusEl.setAttribute("value", "");              progressTitleEl.setAttribute("value", meterText);                            deck.setAttribute("index", "2");              progressInfo.progressWindow = top.window;              progressInfo.intervalState = setInterval("ContinueImportCallback()", 100);							return( true);						}					}					else 					{						ShowImportResults(false, 'Mail');						return( false);					}					break;									case "addressbook":					top.successStr = Components.classes["component://netscape/supports-wstring"].createInstance();					if (top.successStr)						top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsWString);					top.errorStr = Components.classes["component://netscape/supports-wstring"].createInstance();					if (top.errorStr)						top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsWString);										if (ImportAddress( module, top.successStr, top.errorStr) == true) {						// We think it was a success, either, we need to 						// wait for the import to finish						// or we are done!						if (top.progressInfo.importInterface == null) {							ShowImportResults(true, 'Address');							return( true);						}						else {							var meterText = GetFormattedBundleString('MailProgressMeterText', name);              header.setAttribute("description", meterText);                            progressStatusEl.setAttribute("value", "");              progressTitleEl.setAttribute("value", meterText);                            deck.setAttribute("index", "2");              progressInfo.progressWindow = top.window;              progressInfo.intervalState = setInterval("ContinueImportCallback()", 100);            							return( true);						}					}					else 					{						ShowImportResults(false, 'Address');						return( false);					}					break;				case "settings":					var error = new Object();					error.value = null;					var newAccount = new Object();					if (!ImportSettings( module, newAccount, error)) 					{						if (error.value)              ShowImportResultsRaw(GetBundleString( 'ImportSettingsFailed'), null);						// the user canceled the operation, shoud we dismiss						// this dialog or not?						return false;					}					else            ShowImportResultsRaw(GetFormattedBundleString( 'ImportSettingsSuccess', name), null);					break;			}		}	}		return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/0257791053c2b38e1dfaf2ee11afae973e82e394/importDialog.js/clean/mailnews/import/resources/content/importDialog.js