rem: } else { console.write("don't need to update list!"); 
context: function refreshCommandButtons(){	if( shouldUpdateStat( "actions.create.list" ) )	{		console.write("need to update list!");				// Everything in this block is tied to properties in		// actions.create.list, the above check should limit the		// number of times this update is needlessly made.			// Update train/research/build lists.		listCounter	= 1; 		// This whole section needs to be rewritten (now list of XML attributes instead of semicolon-delimited string).		unitArray 	= UpdateList(action_tab_train, listCounter); 		if (unitArray != 0)	 listCounter++;		structcivArray 	= UpdateList(action_tab_buildciv, listCounter);		if (structcivArray != 0) listCounter++;		structmilArray 	= UpdateList(action_tab_buildmil, listCounter);		if (structmilArray != 0) listCounter++;		techArray 	= UpdateList(action_tab_research, listCounter);		if (techArray != 0)	 listCounter++;				formationArray 	= UpdateList(action_tab_formation, listCounter);	if (formationArray != 0) listCounter++;		stanceArray 	= UpdateList(action_tab_stance, listCounter);		if (stanceArray != 0)	 listCounter++;	}	else	{		console.write("don't need to update list!");	}		if( shouldUpdateStat( "actions" ) )	{		// Update commands.		commandCounter = snStatusPaneCommand.tab.max;		commandCounter = UpdateCommand(action_attack, commandCounter);		commandCounter = UpdateCommand(action_patrol, commandCounter);		commandCounter = UpdateCommand(action_repair, commandCounter);		commandCounter = UpdateCommand(action_gather_food, commandCounter);		commandCounter = UpdateCommand(action_gather_wood, commandCounter);		commandCounter = UpdateCommand(action_gather_stone, commandCounter);		commandCounter = UpdateCommand(action_gather_ore, commandCounter);	}	if (listCounter > 0 && commandCounter > 0)	{		// Clear remaining buttons between them.		for (commandClearLoop = listCounter; commandClearLoop <= commandCounter; commandClearLoop++)		{			guiHide("snStatusPaneCommand" + commandClearLoop + "_1");			// If this slot could possibly contain a list, hide that too.			guiHide("snStatusPaneCommand" + "Group" + commandClearLoop);		}	}/*	// Update production queue.	GUIObject = getGUIObjectByName("snStatusPaneCommandProgress");	// If the entity has a production item underway,	if ( selection[0].actions.create && selection[0].actions.create.progress	  && selection[0].actions.create.progress.valueOf()          && selection[0].actions.create.progress.valueOf().current          && selection[0].actions.create.queue.valueOf()          && selection[0].actions.create.queue.valueOf()[0].traits.creation.time )	{		// Set the value of the production progress bar.		GUIObject.caption = ((Math.round(Math.round(selection[0].actions.create.progress.valueOf().current)) * 100 ) / Math.round(selection[0].actions.create.queue.valueOf()[0].traits.creation.time));		// Set position of progress bar.		GUIObject.size = getGUIObjectByName("snStatusPaneCommand" + selection[0].actions.create.queue.valueOf()[0].tab + "_" + selection[0].actions.create.queue.valueOf()[0].list).size;		// Set progress bar tooltip.//		GUIObject.tooltip = "Training " + selection[0].actions.create.queue.valueOf()[0].traits.id.generic + " ... " + (Math.round(selection[0].actions.create.queue.valueOf()[0].traits.creation.time-Math.round(selection[0].actions.create.progress.valueOf().current)) + " seconds remaining.";		// Reveal progressbar.		GUIObject.hidden  = false;				// Seek through queue.		for( queueEntry = 0; queueEntry < selection[0].actions.create.queue.valueOf().length; queueEntry++)		{			// Update list buttons so that they match the number of entries of that type in the queue.			getGUIObjectByName("snStatusPaneCommand" + selection[0].actions.create.queue.valueOf()[queueEntry].tab + "_" + selection[0].actions.create.queue.valueOf()[queueEntry].list).caption++;		}	}	else	{		// Hide the progress bar.		GUIObject.hidden  = true;		GUIObject.tooltip = "";	}*/}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/3d43d9bfa9437391dce94d02eaa339dd31047a2b/functions_page_session_status_commands.js/buggy/binaries/data/mods/official/gui/test/functions_page_session_status_commands.js