rem: case "color": var r, g, b, color = elementObject.value; if( color.indexOf("#") != -1 ) { color = color.substring( color.indexOf("#"), color.length ); r = "0x" + color.substring( 0, 2 ); g = "0x" + color.substring( 2, 4 ); b = "0x" + color.substring( 4, 6 ); var value = r + "," + g + "," + b; dump("*** COLOR VALUE: " + value + "\n"); } whp.SetColorPref( elementObject.prefstring, r, g, b ); break; 
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  //dump("*** elementObject.prefString: " + elementObject.prefstring + "; value: " + elementObject.value + "; id: " + elementID + "\n" );  if( elementObject.pref ) {    switch( elementObject.preftype ) {      case "bool":        whp.SetBoolPref( elementObject.prefstring, elementObject.value );  // bool pref        break;      case "int":        if( elementObject.value ) { // only want checked radio items!           if( elementObject.nodeName.toLowerCase() == "select" ) {            // may need to add extra elements here if they do not have easily             // gleanable idxes as radio buttons do.            elementObject.prefindex = elementObject.value;            }          if( !elementObject.prefindex ) {            var prefvalue = elementObject.value;          }          else {            var prefvalue = elementObject.prefindex;          }          whp.SetIntPref( elementObject.prefstring, prefvalue );  // integer pref        }        break;      case "string":        dump("*** SetCharPref: " + elementObject.prefstring + "; value: " + elementObject.value + "\n");        //XXX there's some kind of bug here with this such that this throws an UNEXPECTED        //XXX exception. look into this later.        whp.SetCharPref( elementObject.prefstring, elementObject.value );  // string pref        break;      case "color":        var r, g, b, color = elementObject.value;         if( color.indexOf("#") != -1 ) {          color = color.substring( color.indexOf("#"), color.length );          r = "0x" + color.substring( 0, 2 );          g = "0x" + color.substring( 2, 4 );          b = "0x" + color.substring( 4, 6 );          var value = r + "," + g + "," + b;          dump("*** COLOR VALUE: " + value + "\n");        }        whp.SetColorPref( elementObject.prefstring, r, g, b );        break;      default:        // TODO: insert implementation for other pref types;        break;    }  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/523f3268ca7fc7e621bf74802efa72e36544d650/pref.js/buggy/xpfe/components/prefwindow/resources/content/pref.js