rem: gPrefInt = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); } catch (ex) { dump("failed to get prefs service!\n"); gPrefInt = null; } try { var ldapUrl = Components.classes["@mozilla.org/network/ldap-url;1"]; ldapUrl = ldapUrl.createInstance(). QueryInterface(Components.interfaces.nsILDAPURL); } catch (ex) { dump("failed to get ldap url service!\n"); ldapUrl = null; } try{ var prefValue = gPrefInt.getComplexValue(gCurrentDirectoryString +".description", Components.interfaces.nsISupportsWString).data; } catch(ex){ 
add: var prefValue = gPrefInt.getComplexValue(gCurrentDirectoryString + ".description", Components.interfaces.nsISupportsWString).data; } catch(ex) { 
context: function fillSettings(){  try {    gPrefInt = Components.classes["@mozilla.org/preferences-service;1"]                         .getService(Components.interfaces.nsIPrefBranch);  }  catch (ex) {    dump("failed to get prefs service!\n");    gPrefInt = null;  }  try {    var ldapUrl = Components.classes["@mozilla.org/network/ldap-url;1"];    ldapUrl = ldapUrl.createInstance().              QueryInterface(Components.interfaces.nsILDAPURL);  }  catch (ex) {    dump("failed to get ldap url service!\n");    ldapUrl = null;  }  try{    var prefValue = gPrefInt.getComplexValue(gCurrentDirectoryString +".description",                                             Components.interfaces.nsISupportsWString).data;  }  catch(ex){    prefValue="";  }    if (ldapUrl && prefValue)  {    document.getElementById("description").value = prefValue;    try{      prefValue = gPrefInt.getComplexValue(gCurrentDirectoryString +".uri",                                           Components.interfaces.nsISupportsWString).data;    }    catch(ex){      prefValue="";    }    if (prefValue)    {      ldapUrl.spec = prefValue;      document.getElementById("hostname").value = ldapUrl.host;      document.getElementById("port").value = ldapUrl.port;      try {        gLdapService = Components.classes[            "@mozilla.org/network/ldap-service;1"].            getService(Components.interfaces.nsILDAPService);      }      catch (ex)      {         dump("failed to get ldapService \n");        gLdapService = null;      }      if (gLdapService) {        document.getElementById("basedn").value = gLdapService.                                          UTF8toUCS2(ldapUrl.dn);        document.getElementById("search").value = gLdapService.                                          UTF8toUCS2(ldapUrl.filter);      }      var sub = document.getElementById("sub");      switch(ldapUrl.scope)      {        case 1:          sub.radioGroup.selectedItem = document.getElementById("one"); break;        default:          sub.radioGroup.selectedItem = sub; break;      }      if (ldapUrl.options & ldapUrl.OPT_SECURE)        document.getElementById("secure").setAttribute("checked", "true");    }    try {      prefValue = gPrefInt.getIntPref(gCurrentDirectoryString+ ".maxHits");    }    catch(ex) {      prefValue = kDefaultMaxHits;    }    document.getElementById("results").value = prefValue;    try{      prefValue = gPrefInt.getBoolPref(gCurrentDirectoryString +".auth.enabled");    }    catch(ex){      prefValue = false;    }    document.getElementById("login").setAttribute("checked", prefValue);  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/d066d1f28f7302c776686c065ce228b20d19e89a/pref-directory-add.js/buggy/mailnews/addrbook/prefs/resources/content/pref-directory-add.js