rem: if( elementObject.value ) { if( !elementObject.prefindex ) {  var prefvalue = elementObject.value; } else {  var prefvalue = elementObject.prefindex; } 
add: dump("*** elementObject.elType = " + elementObject.elType + "\n"); if( elementObject.elType.toLowerCase() == "radio" && !elementObject.value ) return false; if( !elementObject.prefindex ) {  var prefvalue = elementObject.value; } else {  var prefvalue = elementObject.prefindex; } try { var oldPref = whp.GetIntPref( elementObject.prefstring ); } catch(e) { var oldPref = 0; } dump("*** going to set int pref: " + elementObject.prefstring + " = " + prefvalue + "\n"); if( oldPref != prefvalue ) 
context: function PREF_ParsePref( elementID, elementObject ){  var whp = window.handle.pref; // shortcut    // since we no longer use the convoluted id strings, we now use the id passed  // in as an argument to this function to grab the appropriate element in the  if( elementObject.pref ) {    switch( elementObject.preftype ) {      case "bool":        if( elementObject.prefindex === "true" || elementObject.prefindex === "false" ) {          // bool prefs with a prefindex, e.g. boolean radios. the value we set          // is actually the prefindex, not the checked value.           if( elementObject.value == true ) {            if( typeof( elementObject.prefindex ) == "string" ) {              if( elementObject.prefindex == "true" )                 elementObject.prefindex = true;              else                elementObject.prefindex = false;            }            dump("*** going to set a " + typeof( elementObject.prefindex ) + " pref: " + elementObject.prefindex + "\n");            var tempPref = elementObject.prefindex;            whp.SetBoolPref( elementObject.prefstring, tempPref );  // bool pref            dump("*** just set a " + typeof( tempPref ) + " pref: " + tempPref + "\n");            break;          }        }        whp.SetBoolPref( elementObject.prefstring, elementObject.value );  // bool pref        break;      case "int":        if( elementObject.value ) { // only want checked radio items!           if( !elementObject.prefindex ) {            // element object does not have a prefindex (e.g. select widgets)            var prefvalue = elementObject.value;          }          else {            // element object has prefindex attribute (e.g. radio buttons)            var prefvalue = elementObject.prefindex;          }          whp.SetIntPref( elementObject.prefstring, prefvalue );  // integer pref        }        break;      case "string":        whp.SetCharPref( elementObject.prefstring, elementObject.value );  // string pref        break;      default:        // TODO: insert implementation for other pref types;        break;    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d812af0ba8d8722dc7f436b583a529a8957116cb/pref.js/clean/xpfe/components/prefwindow/resources/content/pref.js