rem: var supportsarray =Components.classes["component: 
add: var supportsarray =Components.classes["@mozilla.org/supports-array;1"].getService(Components.interfaces.nsISupportsArray); 
context: function deleteMessage() {	var flag = 0;	netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");	try {		var supportsarray =Components.classes["component://netscape/supports-array"].getService(Components.interfaces.nsISupportsArray); 		dump("ARRAY = " + supportsarray + "\n"); 		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 		dump("MSGWINDOW = " + msgwindow + "\n");		for (var j=0; j<accountManager.allServers.Count(); j++) {		var server = accountManager.allServers.GetElementAt(j).QueryInterface(Components.interfaces.nsIMsgIncomingServer);		if (server.username == 'parp3')  {			var rootFolder = server.RootFolder;			dump("RootFolder = " + rootFolder + "\n");			var subFolderEnumerator = rootFolder.GetSubFolders();			var dsubfolders = nsIEnumerator2JSArray(subFolderEnumerator, Components.interfaces.nsIMsgFolder);			for (var i=0; i<dsubfolders.length; i++) {				if((dsubfolders[i].name == 'Inbox') || (dsubfolders[i].name == 'INBOX')) {					var resource = dsubfolders[i].QueryInterface(Components.interfaces.nsIRDFResource);					dump("resource uri = " + resource.Value + "\n");					var messages_enumerator = dsubfolders[i].getMessages(msgwindow);					var messages = nsISimpleEnumerator2JSArray(messages_enumerator, Components.interfaces.nsIMessage);					dump("# Messages = " + messages.length + "\n");					for (var k=0; k<messages.length; k++) {						if (messages[k].subject == time) {							dump(k + " subject = " + messages[k].subject + "\n");							dump(k + " Recepients = " + messages[k].recipients + "\n");							supportsarray.AppendElement(messages[k]);							dump("Added to Array \n");							dsubfolders[i].deleteMessages(supportsarray, msgwindow, true, false);							flag = 1;						} //if					}  //for				} //if			}  //for		}  //if		} //for		if (flag == 1) {			rv += "DeleteMsg:" + "\t" + "Passed" + "\n";			dump("Writing Passed to file for DeleteMsg...\n");			//document.write("<br>" + "deleteMsg: " + "\t" + "Passed" + "\n");		}		else {			rv += "DeleteMsg:" + "\t" + "Failed" + "\n";			dump("Writing Failed to file for DeleteMsg...\n");			//document.write("<br>" + "deleteMsg: " + "\t" + "Failed" + "\n");			if (final_result == "Passed")				final_result = "Failed";		}	}  // try	catch (e) {		dump("E = " + e + "\n");	}} //fn
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/0257791053c2b38e1dfaf2ee11afae973e82e394/imapTest.js/clean/mailnews/base/resources/content/imapTest.js