rem: messenger.SetWindow(window, msgWindow); 
add: messenger.setWindow(window, msgWindow); 
context: function ComposeMessage(type, format, folder, messageArray){  var msgComposeType = Components.interfaces.nsIMsgCompType;  var identity = null;  var newsgroup = null;  var server;  // dump("ComposeMessage folder=" + folder + "\n");  try  {    if (folder)    {      // Get the incoming server associated with this uri.      server = folder.server;      // If they hit new or reply and they are reading a newsgroup,      // turn this into a new post or a reply to group.      if (!folder.isServer && server.type == "nntp" && type == msgComposeType.New)      {        type = msgComposeType.NewsPost;        newsgroup = folder.folderURL;      }      identity = getIdentityForServer(server);      // dump("identity = " + identity + "\n");    }  }  catch (ex)  {    dump("failed to get an identity to pre-select: " + ex + "\n");  }  // dump("\nComposeMessage from XUL: " + identity + "\n");  var uri = null;  if (!msgComposeService)  {    dump("### msgComposeService is invalid\n");    return;  }  if (type == msgComposeType.New)  {    // New message.    // dump("OpenComposeWindow with " + identity + "\n");    // If the addressbook sidebar panel is open and has focus, get    // the selected addresses from it.    if (document.commandDispatcher.focusedWindow.document.documentElement.hasAttribute("selectedaddresses"))      NewMessageToSelectedAddresses(type, format, identity);    else      msgComposeService.OpenComposeWindow(null, null, type, format, identity, msgWindow);    return;  }  else if (type == msgComposeType.NewsPost)  {    // dump("OpenComposeWindow with " + identity + " and " + newsgroup + "\n");    msgComposeService.OpenComposeWindow(null, newsgroup, type, format, identity, msgWindow);    return;  }  messenger.SetWindow(window, msgWindow);  var object = null;  if (messageArray && messageArray.length > 0)  {    uri = "";    for (var i = 0; i < messageArray.length; ++i)    {      var messageUri = messageArray[i];      var hdr = messenger.msgHdrFromURI(messageUri);      // If we treat reply from sent specially, do we check for that folder flag here ?      var hintForIdentity = (type == msgComposeType.Template) ? hdr.author : hdr.recipients + hdr.ccList;      var accountKey = hdr.accountKey;      if (accountKey.length > 0)      {        var account = accountManager.getAccount(accountKey);        if (account)          server = account.incomingServer;      }      if (server)        identity = getIdentityForServer(server, hintForIdentity);      if (folder && (!identity || hintForIdentity.search(identity.email) < 0))      {        server = folder.server;        if (server)        {          var tmpIdentity = getIdentityForServer(server, hintForIdentity);          if (tmpIdentity && hintForIdentity.search(tmpIdentity.email) >= 0)            identity = tmpIdentity;        }      }      if (type == msgComposeType.Reply ||        type == msgComposeType.ReplyAll ||        type == msgComposeType.ReplyToList ||        type == msgComposeType.ForwardInline ||        type == msgComposeType.ReplyToGroup ||        type == msgComposeType.ReplyToSender ||        type == msgComposeType.ReplyToSenderAndGroup ||        type == msgComposeType.Template ||        type == msgComposeType.Draft)      {        msgComposeService.OpenComposeWindow(null, messageUri, type, format, identity, msgWindow);        // Limit the number of new compose windows to 8. Why 8 ? I like that number :-)        if (i == 7)          break;      }      else      {        if (i)          uri += ","        uri += messageUri;      }    }    if (type == msgComposeType.ForwardAsAttachment)      msgComposeService.OpenComposeWindow(null, uri, type, format, identity, msgWindow);  }  else    dump("### nodeList is invalid\n");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/0d4059c32bb899b0b564e88da3b2dd8cd4e4a21e/mailCommands.js/clean/mailnews/base/resources/content/mailCommands.js