rem: if (appCore) object = appCore.GetRDFResourceForMessage(tree, nodeList); msgComposeService.OpenComposeWindow(null, nodeList[i].getAttribute('id'), type, format, object, identity); 
add: msgComposeService.OpenComposeWindow(null, nodeList[i].getAttribute('id'), type, format, identity); 
context: function ComposeMessage(type, format)//type: 0=new message, 1=reply, 2=reply all,//      3=forward inline, 4=forward as attachment////format: 0=default (use preference), 1=HTML, 2=plain text{        var identity = null;	try 	{		var folderTree = GetFolderTree();		var selectedFolderList = folderTree.selectedItems;		if(selectedFolderList.length > 0)		{			var selectedFolder = selectedFolderList[0]; 			var uri = selectedFolder.getAttribute('id');			// dump("selectedFolder uri = " + uri + "\n");			// get the incoming server associated with this uri			var server = FindIncomingServer(uri);			// dump("server = " + server + "\n");			// get the identity associated with this server			var identities = accountManager.GetIdentitiesForServer(server);			// dump("identities = " + identities + "\n");			// just get the first one			if (identities.Count() > 0 ) {				identity = identities.GetElementAt(0).QueryInterface(Components.interfaces.nsIMsgIdentity);  			}		}		// dump("identity = " + identity + "\n");	}	catch (ex) 	{		// dump("failed to get an identity to pre-select\n");	}	dump("\nComposeMessage from XUL\n");	var uri = null;	if (! msgComposeService)	{		dump("### msgComposeService is invalid\n");		return;	}		if (type == 0) //new message	{		//dump("OpenComposeWindow with " + identity + "\n");		msgComposeService.OpenComposeWindow(null, null, 0, format, null, identity);		return;	}			var tree = GetThreadTree();	if (tree)	{		var nodeList = tree.selectedItems;		var appCore = FindMessenger();		if (appCore)			appCore.SetWindow(window, msgWindow);					var object = null;			if (nodeList && nodeList.length > 0)		{			uri = "";			for (var i = 0; i < nodeList.length && i < 8; i ++)			{					dump('i = '+ i);				dump('\n');								if (type == 1 || type == 2) //reply or reply all				{					if (appCore)						object = appCore.GetRDFResourceForMessage(tree, nodeList); //temporary					msgComposeService.OpenComposeWindow(null, nodeList[i].getAttribute('id'), type, format, object, identity);				}				else				{					if (i) 						uri += " "					uri += nodeList[i].getAttribute('id');				}			}						if (type == 3 || type == 4) //forward			{				if (appCore)					object = appCore.GetRDFResourceForMessage(tree, nodeList); //temporary				msgComposeService.OpenComposeWindow(null, uri, type, format, object, identity);			}		}		else			dump("### nodeList is invalid\n");	}	else		dump("### tree is invalid\n");}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/94be52758665d1b3f86e266825a63948fd1e1d92/commandglue.js/buggy/mailnews/base/resources/content/commandglue.js