rem: editCard.card.aimScreenName = window.arguments[0].aimScreenName; 
add: gEditCard.card.aimScreenName = window.arguments[0].aimScreenName; 
context: function OnLoadNewCard(){  InitEditCard();  var cardproperty;  // if one is passed in, use it  try {    cardproperty = window.arguments[0].QueryInterface(Components.interfaces.nsIAbCard);  }  catch (ex) {    cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance(Components.interfaces.nsIAbCard);  }  editCard.card = cardproperty;  editCard.titleProperty = "newCardTitle";  editCard.selectedAB = "";  if ("arguments" in window && window.arguments[0])  {    if ("selectedAB" in window.arguments[0]) {      // check if selected ab is a mailing list      var abURI = window.arguments[0].selectedAB;            var directory = GetDirectoryFromURI(abURI);      if (directory.isMailList) {        var parentURI = GetParentDirectoryFromMailingListURI(abURI);        if (parentURI) {          editCard.selectedAB = parentURI;        }        else {          // it's a mailing list, but we failed to determine the parent directory          // use the personal addressbook          editCard.selectedAB = kPersonalAddressbookURI;        }      }      else if (!(directory.operations & directory.opWrite)) {        editCard.selectedAB = kPersonalAddressbookURI;      }      else {      editCard.selectedAB = window.arguments[0].selectedAB;      }    }    else {      editCard.selectedAB = kPersonalAddressbookURI;    }    // we may have been given properties to pre-initialize the window with....    // we'll fill these in here...    if ("primaryEmail" in window.arguments[0])      editCard.card.primaryEmail = window.arguments[0].primaryEmail;    if ("displayName" in window.arguments[0]) {      editCard.card.displayName = window.arguments[0].displayName;      // if we've got a display name, don't generate      // a display name (and stomp on the existing display name)      // when the user types a first or last name      if (editCard.card.displayName.length)        editCard.generateDisplayName = false;    }    if ("aimScreenName" in window.arguments[0])      editCard.card.aimScreenName = window.arguments[0].aimScreenName;        if ("okCallback" in window.arguments[0])      gOkCallback = window.arguments[0].okCallback;    if ("escapedVCardStr" in window.arguments[0]) {	  // hide non vcard values	  HideNonVcardFields();       var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook);      editCard.card = addressbook.escapedVCardToAbCard(window.arguments[0].escapedVCardStr);    }    if ("titleProperty" in window.arguments[0])      editCard.titleProperty = window.arguments[0].titleProperty;        if ("hideABPicker" in window.arguments[0])      gHideABPicker = window.arguments[0].hideABPicker;  }  // set popup with address book names  var abPopup = document.getElementById('abPopup');  abPopup.value = editCard.selectedAB || kPersonalAddressbookURI;  if (gHideABPicker && abPopup) {    abPopup.hidden = true;    var abPopupLabel = document.getElementById("abPopupLabel");    abPopupLabel.hidden = true;  }  SetCardDialogTitle(editCard.card.displayName);      GetCardValues(editCard.card, document);  // FIX ME - looks like we need to focus on both the text field and the tab widget  // probably need to do the same in the addressing widget  // focus on first or last name based on the pref  var focus;  if (editCard.displayLastNameFirst)    focus = document.getElementById('LastName');  else    focus = document.getElementById('FirstName');  if ( focus ) {    // XXX Using the setTimeout hack until bug 103197 is fixed    setTimeout( function(firstTextBox) { firstTextBox.focus(); }, 0, focus );  }  moveToAlertPosition();}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/6c5c2aff09df2e4a4f9000a6243a93971c45a5ec/abCardOverlay.js/buggy/mail/components/addrbook/content/abCardOverlay.js