rem: var genTextData = Components.classes["component: 
add: var genTextData = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(Components.interfaces.nsISupportsWString); 
context: function BeginDragThreadTree(event){	debugDump("BeginDragThreadTree\n");    if (event.target.localName != "treecell" &&        event.target.localName != "treeitem")        return false;	//XXX we rely on a capturer to already have determined which item the mouse was over	//XXX and have set an attribute.    	// if the click is on the tree proper, ignore it. We only care about clicks on items.	var tree = GetThreadTree();	if ( event.target == tree )		return(true);					// continue propagating the event    	var childWithDatabase = tree;	if ( ! childWithDatabase )		return(false);	var database = childWithDatabase.database;	var rdf = GetRDFService();	if ((!rdf) || (!database))	{ debugDump("CAN'T GET DATABASE\n"); return(false); }		if (event.ctrlKey)		ctrlKeydown = true;	else		ctrlKeydown = false;			        	var dragStarted = false;	var dragService = GetDragService();	if ( !dragService )	return(false);	var transArray = Components.classes["component://netscape/supports-array"].createInstance(Components.interfaces.nsISupportsArray);	if ( !transArray ) return(false); 	var selArray = tree.selectedItems;	var count = selArray.length;	debugDump("selArray.length = " + count + "\n");	for ( var i = 0; i < count; ++i )	{		var trans = Components.classes["component://netscape/widget/transferable"].createInstance(Components.interfaces.nsITransferable);		if ( !trans )		return(false);		var genTextData = Components.classes["component://netscape/supports-wstring"].createInstance(Components.interfaces.nsISupportsWString);		if (!genTextData)	return(false);		trans.addDataFlavor("text/nsmessage");        		// get id (url) 		var id = selArray[i].getAttribute("id");		genTextData.data = id;		debugDump("    ID #" + i + " = " + id + "\n");		trans.setTransferData ( "text/nsmessage", genTextData, id.length * 2 );  // doublebyte byte data		// put it into the transferable as an |nsISupports|		var genTrans = trans.QueryInterface(Components.interfaces.nsISupports);		transArray.AppendElement(genTrans);	}	var nsIDragService = Components.interfaces.nsIDragService;	dragService.invokeDragSession ( event.target, transArray, null, nsIDragService.DRAGDROP_ACTION_COPY + 		nsIDragService.DRAGDROP_ACTION_MOVE );	dragStarted = true;	return(!dragStarted);  // don't propagate the event if a drag has begun}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/0257791053c2b38e1dfaf2ee11afae973e82e394/messengerdnd.js/buggy/mailnews/base/resources/content/messengerdnd.js