rem: var parentArray = Components.classes["component: if ( !parentArray ) return (false); for ( var i = 0; i < count; ++i ) { var parent = selArray[i].parentNode.parentNode; if (parent) { if (parent == dirTree) var parentId = "abdirectory: else var parentId = parent.getAttribute("id"); debugDump("    parentId #" + i + " = " + parentId + "\n"); var dirResource = rdf.GetResource(parentId); var parentDir = dirResource.QueryInterface(Components.interfaces.nsIAbDirectory); parentArray.AppendElement(parentDir); } } 
add: var selArray = dirTree.selectedItems; var count = selArray.length; debugDump("selArray.length = " + count + "\n"); if (count == 0) return; 
context: function AbDeleteDirectory(){	dump("\AbDeleteDirectory from XUL\n");	var confirmDeleteAddressbook =	Bundle.GetStringFromName("confirmDeleteAddressbook");	if(!window.confirm(confirmDeleteAddressbook))		return;	var selArray = dirTree.selectedItems;	var count = selArray.length;	debugDump("selArray.length = " + count + "\n");	if (count == 0)		return;	var parentArray = Components.classes["component://netscape/supports-array"].createInstance(Components.interfaces.nsISupportsArray);	if ( !parentArray ) return (false); 	for ( var i = 0; i < count; ++i )	{		var parent = selArray[i].parentNode.parentNode;		if (parent)		{			if (parent == dirTree)				var parentId = "abdirectory://";			else					var parentId = parent.getAttribute("id");			debugDump("    parentId #" + i + " = " + parentId + "\n");			var dirResource = rdf.GetResource(parentId);			var parentDir = dirResource.QueryInterface(Components.interfaces.nsIAbDirectory);			parentArray.AppendElement(parentDir);		}	}	top.addressbook.deleteAddressBooks(dirTree.database, parentArray, dirTree.selectedItems);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1bde4cf8448f6f3b98a3f0ef7827eac9719d26e9/addressbook.js/clean/mailnews/addrbook/resources/content/addressbook.js