context: function selectLang()	{    //get pref services	var pref = null;	try	{		pref = Components.classes["component://netscape/preferences"];		if (pref)	pref = pref.getService();		if (pref)	pref = pref.QueryInterface(Components.interfaces.nsIPref);	}	catch(ex)	{		dump("failed to get prefs service!\n");		pref = null;	}    //Getting variables needed	lang = document.getElementById("selectLangs").value;	//set prefstring of size	var fontVarPref = 'font.size.variable.' + lang;	var fontfixPref = 'font.size.fixed.' + lang;	var sizeVar =  document.getElementById('size');	var sizeFix =  document.getElementById('sizeFixed');	sizeVar.setAttribute('prefstring', fontVarPref);		sizeFix.setAttribute('prefstring', fontfixPref);	//Get size from the preferences	var fixedFont = null;	try	{		if (pref)		{			var fontVarInt = pref.GetIntPref(fontVarPref);			var fontfixInt = pref.GetIntPref(fontfixPref);		}	}	catch(ex)	{	    //Default to 16 and 14 if no size is in the pref		fixedFont = null;		fontVarInt = "16"		fontfixInt = "14"	}	dump(fixedFont + "\n");			for (i = 0; i < generics.length; i++)  {		var select = document.getElementById(generics[i]);		var selectParent = select.parentNode;		//create name of font prefstring		var fontPrefstring = 'font.name.' + generics[i] + '.' + lang;		select.setAttribute('prefstring', fontPrefstring);		//Clear the select list		ClearList(select);						fonts = enumerator.EnumerateFonts(lang, generics[i], fontCount);				//Append to the select list.  Build the new select list		for (j = 0; j < fonts.length; j++) {		    AppendStringToList(select, fonts[j]) 		}        		//Get the pref value of the font		var fixedFont = null;		try		{			if (pref)			{				var selectVal = pref.CopyCharPref(fontPrefstring);			}		}		catch(ex)		{			selectVal = fonts[0];		}	    dump(fixedFont + "\n");		//select the value of the string		select.value = selectVal;		dump('select:' + select.getAttribute('prefstring') + "\n");			}    //set the value of the sizes	sizeVar.value = fontVarInt;    sizeFix.value = fontfixInt;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b40b550b5e1d45a00d2b7b52b7080002729333c6/pref-fonts.js/buggy/xpfe/components/prefwindow/resources/content/pref-fonts.js