rem: var nsIDragService = Components.interfaces.nsIDragService; 
context: function BeginDragTree(event, tree, flavor){    if ( event.target == tree )        return(true); // continue propagating the event        var treeItem = event.target.parentNode.parentNode;    if (!treeItem)	return(false);            var childWithDatabase = tree;    if ( ! childWithDatabase )       return(false);    var database = childWithDatabase.database;    if ((!RDF) || (!database))	{ debugDump("CAN'T GET DATABASE\n"); return(false); }	    var dragStarted = false;    var transArray = Components.classes["@mozilla.org/supports-array;1"].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["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);        if ( !trans )		return(false);        var genTextData = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(Components.interfaces.nsISupportsWString);        if (!genTextData)	return(false);        trans.addDataFlavor(flavor);                // get id (url)         var id = selArray[i].getAttribute("id");        genTextData.data = id;        debugDump("    ID #" + i + " = " + id + "\n");        trans.setTransferData ( flavor, 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: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/57b2002912f236f6f666c1f0d1675e375a85ec3f/messengerdnd.js/clean/mailnews/base/resources/content/messengerdnd.js