rem: listName = selection[0].actions.create.list.unit; 
add: if (selection[0].actions.create.list.unit) listName = selection[0].actions.create.list.unit.toString(); 
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].actions.create && selection[0].actions.create.list)	{		switch (listIcon)		{			case "tab_train":				listName = selection[0].actions.create.list.unit;			break;			case "tab_buildciv":				listName = selection[0].actions.create.list.structciv;			break;			case "tab_buildmil":				listName = selection[0].actions.create.list.structmil;			break;			case "tab_research":				listName = selection[0].actions.create.list.tech;			break;			default:				return 0;			break;		}		if (listName)		{			// Enable tab portrait.			setPortrait("session_panel_status_command_pri_" + listCol, listIcon);			GUIObjectUnhide("session_panel_status_command_pri_" + listCol);			// Extract entity list into an array.			// (Give it a string literally identical to the attribute, as for some reason it doesn't work right now. :(//			listArray = parseDelimiterString(listName, ";");			listArray = parseDelimiterString("hele_fem_b1;hele_isp_u1;hele_fem_b1;hele_fem_b1;hele_isp_u1;hele_isp_u1;hele_isp_u1;hele_isp_u1;hele_isp_u1;hele_isp_u1;hele_isp_u1;hele_isp_u1;hele_isp_u1", ";");			// Populate appropriate command buttons.			for (createLoop = 1; createLoop <= command_sub_max; createLoop++)			{				if (createLoop < listArray.length+1)				{					if (getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell && getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell != "")						setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon + "_" + getEntityTemplate(listArray[createLoop-1]).traits.id.icon_cell);					else						setPortrait("session_panel_status_command_pri_" + listCol + "_" + createLoop, getEntityTemplate(listArray[createLoop-1]).traits.id.icon);					GUIObjectUnhide("session_panel_status_command_pri_" + listCol + "_" + createLoop);				}				else					GUIObjectHide("session_panel_status_command_pri_" + listCol + "_" + createLoop);			}			return listArray;		}	}	else		return 0;}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/8ce263a002c670727dff679af908b700e9225b80/functions_session_status_orb.js/clean/binaries/data/mods/official/gui/test/functions_session_status_orb.js