rem: listName = selection[0].actions.create.list.unit.toString(); 
add: list = selection[0].actions.create.list.unit; 
context: function UpdateList(listIcon, listCol){	// Populates a given column of command icons with appropriate build portraits for the selected object.	// Returns an array of this selection.	// Build unit list.	if ( selection[0].traits.id.civ_code	&& selection[0].actions	&& selection[0].actions.create	&& selection[0].actions.create.list )	{		listName = "";		switch (listIcon)		{			case action_tab_train:				if ( selection[0].actions.create.list.unit && shouldUpdateStat( "actions.create.list.unit" ) )					listName = selection[0].actions.create.list.unit.toString();			break;			case action_tab_buildciv:				if ( selection[0].actions.create.list.structciv && shouldUpdateStat( "actions.create.list.structciv" ) )					listName = selection[0].actions.create.list.structciv.toString();			break;			case action_tab_buildmil:				if ( selection[0].actions.create.list.structmil && shouldUpdateStat( "actions.create.list.structmil" ) )					listName = selection[0].actions.create.list.structmil.toString();			break;			case action_tab_research:				if ( selection[0].actions.create.list.tech && shouldUpdateStat( "actions.create.list.tech" ) )					listName = selection[0].actions.create.list.tech.toString();			break;			default:				return 0;			break;		}		if (listName != "")		{			// Enable tab portrait.			setPortrait("snStatusPaneCommand" + listCol + "_1", "sheet_action", "", listIcon);			guiUnHide("snStatusPaneCommand" + listCol + "_1");			// Reset list length.			snStatusPaneCommand[listCol][1].last = 0;			// Store content info in tab button for future reference.			snStatusPaneCommand[listCol][1].type = "list";			// Extract entity list into an array.			listArray = parseDelimiterString(listName, ";");			// Populate appropriate command buttons.			for (createLoop = 1; createLoop < snStatusPaneCommand.list.max; createLoop++)			{				if (createLoop < listArray.length)				{					// Get name of entity to display in list.					UpdateListEntityName = selection[0].traits.id.civ_code + "_" + listArray[createLoop];					getGUIObjectByName ("snStatusPaneCommand" + listCol + "_" + createLoop).caption = "";					setPortrait("snStatusPaneCommand" + listCol + "_" + parseInt(createLoop+1), getEntityTemplate(UpdateListEntityName).traits.id.icon, selection[0].traits.id.civ_code, getEntityTemplate(UpdateListEntityName).traits.id.icon_cell);					guiUnHide("snStatusPaneCommand" + listCol + "_" + parseInt(createLoop+1));										// Store content info in tab button for future reference.					snStatusPaneCommand[listCol][parseInt(createLoop+1)].name = listIcon;					snStatusPaneCommand[listCol][parseInt(createLoop+1)].object = listArray[createLoop];					snStatusPaneCommand[listCol][parseInt(createLoop+1)].type = "list";					snStatusPaneCommand[listCol][parseInt(createLoop+1)].last++;				}				else					guiHide("snStatusPaneCommand" + listCol + "_" + parseInt(createLoop+1));			}			return listArray;		}	}	return 0;}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/c7d9dff6556a324f4294f61eb397b5bbd3c9bc5e/functions_page_session_status_commands.js/buggy/binaries/data/mods/official/gui/test/functions_page_session_status_commands.js