Index: java/FramclipsePlugin/src/main/resources/framscript.xml
===================================================================
--- java/FramclipsePlugin/src/main/resources/framscript.xml	(revision 436)
+++ java/FramclipsePlugin/src/main/resources/framscript.xml	(revision 439)
@@ -640,4 +640,14 @@
 			</arguments>
 		</element>
+	</type>
+	<type name="FunctionReference" context="Global context">
+<description><![CDATA[Function reference objects are created using the 'function' operator, the referenced function can be called using the 'call' operator:
+
+	function abc(a,b)
+	{ return a+b; }
+
+	var f=function abc;
+	Simulator.print(typeof(f)); //"FunctionReference"
+	Simulator.print(call(f)(123,321)); //444]]></description>
 	</type>
 	<type name="GenePool" context="Global context">
@@ -4987,5 +4997,5 @@
 		<element name="new" function="true" type="Vector"><arguments/></element>
 		<element name="sort" function="true" type="void" flags="256">
-			<description><![CDATA[comparator can be null, giving the "natural" sorting order (depending on element type), otherwise it must be a function reference obtained by the "function FUNCTIONNAME" operator.
+			<description><![CDATA[comparator can be null, giving the "natural" sorting order (depending on element type), otherwise it must be a function reference obtained from the 'function' operator.
 
 Example:
@@ -4994,5 +5004,5 @@
 v.sort(function compareLastDigit);]]></description>
 			<arguments>
-				<argument name="comparator" type="Object"/>
+				<argument name="comparator" type="FunctionReference"/>
 			</arguments>
 		</element>
@@ -6311,5 +6321,45 @@
 		<element name="msgtype" type="integer" min="0" max="1"/>
 	</type>
-	<type name="CreatureCharts" context="Command line interface">
+	<type name="RowFormat" context="Command line interface">
+<description><![CDATA[Used for creating simple listings of objects (in command line applications). There is only one shared RowFormat object. In order to use RowFormat you should first configure it, by adding column definitions (prepare or addColumn), i.e. defining column names and widths. Then, the "format" method can be invoked on a number of objects (of the same class) returning the formatted rows of the table.
+
+Example:
+RowFormat.clear();
+RowFormat.prepare(Genotype.*,"name/20,strsiz/5,nnsiz/5,fit/6");
+CLI.println(RowFormat.format(Genotype.*));]]></description>
+		<element name="prepare" function="true" type="void">
+			<description><![CDATA[Adds a number of columns, described as FIELD_NAME/WIDTH, columns are separated by "," (comma). Existing column definitions are not removed. Usually you will need to call "clear()" before "prepare".]]></description>
+			<arguments>
+				<argument name="Object" type="Object"/>
+				<argument name="Column Descriptions" type="string"/>
+			</arguments>
+		</element>
+		<element name="format" function="true" type="string">
+			<description><![CDATA[Returns the formatted string taking data from the supplied object.]]></description>
+			<arguments>
+				<argument name="Object" type="Object"/>
+			</arguments>
+		</element>
+		<element name="clear" function="true" type="void">
+			<description><![CDATA[Remove all existing column definitions.]]></description>
+<arguments/></element>
+		<element name="addColumn" function="true" type="void">
+			<description><![CDATA[Low level call, adds a single column. "prepare" is better.]]></description>
+			<arguments>
+				<argument name="Field#" type="integer"/>
+				<argument name="Column width" type="integer"/>
+			</arguments>
+		</element>
+		<element name="fillchar" type="string">
+			<description><![CDATA[The characted used for padding the columns contents]]></description>
+		</element>
+		<element name="fieldsep" type="string">
+			<description><![CDATA[The character used for separating columns]]></description>
+		</element>
+		<element name="header" type="string" flags="1">
+			<description><![CDATA[Contains the field names with the same formatting applied (i.e. with fill and separators)]]></description>
+		</element>
+	</type>
+	<type name="CreatureCharts" context="Framsticks Theater">
 <description><![CDATA[Manages charts for monitoring creatures performance.
 This class has no corresponding static object. If you want to use it, you have to create an object or get a reference to the existing object.]]></description>
@@ -6332,5 +6382,5 @@
 		<element name="creature" type="untyped" flags="290"/>
 	</type>
-	<type name="CreatureSelection" context="Command line interface">
+	<type name="CreatureSelection" context="Framsticks Theater">
 		<element name="count" type="integer" flags="1"/>
 		<element name="get" function="true" type="Creature">
@@ -6351,5 +6401,5 @@
 		<element name="clear" function="true" type="void"><arguments/></element>
 	</type>
-	<type name="DynaChart" context="Command line interface">
+	<type name="DynaChart" context="Framsticks Theater">
 <description><![CDATA[Line chart (visual object). Can be used as the client object in the Window.]]></description>
 		<element name="new" function="true" type="DynaChart" flags="32"><arguments/></element>
@@ -6360,5 +6410,5 @@
 		<element name="xscale" type="integer" min="1" max="20" flags="288"/>
 	</type>
-	<type name="DynaChart2D" context="Command line interface">
+	<type name="DynaChart2D" context="Framsticks Theater">
 <description><![CDATA[2D Line chart (visual object). Can be used as the client object in the Window.]]></description>
 		<element name="new" function="true" type="DynaChart2D" flags="32"><arguments/></element>
@@ -6375,5 +6425,5 @@
 		</element>
 	</type>
-	<type name="GLDisplay" context="Command line interface">
+	<type name="GLDisplay" context="Framsticks Theater">
 <description><![CDATA[OpenGL display for the Framsticks Theater application.]]></description>
 		<element name="simsteps" type="integer" min="0" max="999999" default="0">
@@ -6465,5 +6515,5 @@
 		</element>
 	</type>
-	<type name="GUI" context="Command line interface">
+	<type name="GUI" context="Framsticks Theater">
 <description><![CDATA[Manage GUI elements]]></description>
 		<element name="newLabel" function="true" type="GUIElement">
@@ -6559,5 +6609,5 @@
 				<argument name="identifier" type="string"/>
 				<argument name="timeout" type="float"/>
-				<argument name="function" type="JumpTarget"/>
+				<argument name="function" type="FunctionReference"/>
 			</arguments>
 		</element>
@@ -6573,5 +6623,5 @@
 				<argument name="message" type="string"/>
 				<argument name="buttons" type="Vector"/>
-				<argument name="function" type="JumpTarget"/>
+				<argument name="function" type="FunctionReference"/>
 			</arguments>
 		</element>
@@ -6592,5 +6642,5 @@
 		<element name="bottom_right" type="Element" flags="1"/>
 	</type>
-	<type name="GUIElement" context="Command line interface">
+	<type name="GUIElement" context="Framsticks Theater">
 <description><![CDATA[GUI element]]></description>
 		<element name="name" type="string"/>
@@ -6721,5 +6771,5 @@
 		</element>
 	</type>
-	<type name="ImageExport" context="Command line interface">
+	<type name="ImageExport" context="Framsticks Theater">
 		<element name="imgex_outdir" type="string" default=".">
 			<description><![CDATA[Directory name WITHOUT trailing '/' sign]]></description>
@@ -6747,5 +6797,5 @@
 		<element name="imgex_lastfile" type="string" flags="18"/>
 	</type>
-	<type name="Material" context="Command line interface">
+	<type name="Material" context="Framsticks Theater">
 <description><![CDATA[Material object]]></description>
 		<element name="new" function="true" type="Material"><arguments/></element>
@@ -6756,5 +6806,5 @@
 		<element name="shader" type="Shader" flags="256"/>
 	</type>
-	<type name="Matrix" context="Command line interface">
+	<type name="Matrix" context="Framsticks Theater">
 <description><![CDATA[4x4 Marix object]]></description>
 		<element name="new" function="true" type="Matrix"><arguments/></element>
@@ -6801,5 +6851,5 @@
 		</element>
 	</type>
-	<type name="NeuroDiagram" context="Command line interface">
+	<type name="NeuroDiagram" context="Framsticks Theater">
 <description><![CDATA[Can be used as the client object in the Window.]]></description>
 		<element name="new" function="true" flags="32"/>
@@ -6816,5 +6866,5 @@
 		<element name="hide" function="true" type="void" flags="288"><arguments/></element>
 	</type>
-	<type name="Obj3D" context="Command line interface">
+	<type name="Obj3D" context="Framsticks Theater">
 <description><![CDATA[3D object]]></description>
 		<element name="newEmpty" function="true" type="Obj3D"><arguments/></element>
@@ -6869,5 +6919,5 @@
 		</element>
 	</type>
-	<type name="Rectangle" context="Command line interface">
+	<type name="Rectangle" context="Framsticks Theater">
 <description><![CDATA[GUI Rectangle]]></description>
 		<element name="x" type="float" flags="256"/>
@@ -6884,45 +6934,5 @@
 		</element>
 	</type>
-	<type name="RowFormat" context="Command line interface">
-<description><![CDATA[Used for creating simple listings of objects (in command line applications). There is only one shared RowFormat object. In order to use RowFormat you should first configure it, by adding column definitions (prepare or addColumn), i.e. defining column names and widths. Then, the "format" method can be invoked on a number of objects (of the same class) returning the formatted rows of the table.
-
-Example:
-RowFormat.clear();
-RowFormat.prepare(Genotype.*,"name/20,strsiz/5,nnsiz/5,fit/6");
-CLI.println(RowFormat.format(Genotype.*));]]></description>
-		<element name="prepare" function="true" type="void">
-			<description><![CDATA[Adds a number of columns, described as FIELD_NAME/WIDTH, columns are separated by "," (comma). Existing column definitions are not removed. Usually you will need to call "clear()" before "prepare".]]></description>
-			<arguments>
-				<argument name="Object" type="Object"/>
-				<argument name="Column Descriptions" type="string"/>
-			</arguments>
-		</element>
-		<element name="format" function="true" type="string">
-			<description><![CDATA[Returns the formatted string taking data from the supplied object.]]></description>
-			<arguments>
-				<argument name="Object" type="Object"/>
-			</arguments>
-		</element>
-		<element name="clear" function="true" type="void">
-			<description><![CDATA[Remove all existing column definitions.]]></description>
-<arguments/></element>
-		<element name="addColumn" function="true" type="void">
-			<description><![CDATA[Low level call, adds a single column. "prepare" is better.]]></description>
-			<arguments>
-				<argument name="Field#" type="integer"/>
-				<argument name="Column width" type="integer"/>
-			</arguments>
-		</element>
-		<element name="fillchar" type="string">
-			<description><![CDATA[The characted used for padding the columns contents]]></description>
-		</element>
-		<element name="fieldsep" type="string">
-			<description><![CDATA[The character used for separating columns]]></description>
-		</element>
-		<element name="header" type="string" flags="1">
-			<description><![CDATA[Contains the field names with the same formatting applied (i.e. with fill and separators)]]></description>
-		</element>
-	</type>
-	<type name="Shader" context="Command line interface">
+	<type name="Shader" context="Framsticks Theater">
 <description><![CDATA[Shader object]]></description>
 		<element name="new" function="true" type="Shader">
@@ -6934,5 +6944,5 @@
 		<element name="fragment" type="string" flags="256"/>
 	</type>
-	<type name="Sharing" context="Command line interface">
+	<type name="Sharing" context="Framsticks Theater">
 		<element name="service" type="integer" min="0" max="4"/>
 		<element name="message" type="string"/>
@@ -6949,5 +6959,5 @@
 		<element name="execute" function="true" type="void"><arguments/></element>
 	</type>
-	<type name="ShowManager" context="Command line interface">
+	<type name="ShowManager" context="Framsticks Theater">
 		<element name="show" type="string"/>
 		<element name="name" type="string" flags="50"/>
@@ -6990,5 +7000,5 @@
 		<element name="changedPropertyId" type="string" flags="35"/>
 	</type>
-	<type name="ShowParams" context="Command line interface">
+	<type name="ShowParams" context="Framsticks Theater">
 		<element name="clear" function="true" flags="34"/>
 		<element name="add" function="true" flags="34"/>
@@ -6999,5 +7009,5 @@
 		<element name="changedPropertyId" type="string" flags="35"/>
 	</type>
-	<type name="SimStatsCharts" context="Command line interface">
+	<type name="SimStatsCharts" context="Framsticks Theater">
 <description><![CDATA[Manages charts for monitoring simulator statistics.
 This class has no corresponding static object. If you want to use it, you have to create an object or get a reference to the existing object.]]></description>
@@ -7011,5 +7021,5 @@
 		<element name="createChart" function="true" flags="288"/>
 	</type>
-	<type name="TrackingCam" context="Command line interface">
+	<type name="TrackingCam" context="Framsticks Theater">
 <description><![CDATA[Camera object with the automatic target tracking ability.]]></description>
 		<element name="cam_tracking" type="integer" min="0" max="3" default="1"/>
@@ -7071,5 +7081,5 @@
 		</element>
 	</type>
-	<type name="VisualStyle" context="Command line interface">
+	<type name="VisualStyle" context="Framsticks Theater">
 		<element name="style" type="string" default="standard"/>
 		<element name="name" type="string" flags="19"/>
@@ -7124,5 +7134,5 @@
 		</element>
 	</type>
-	<type name="Window" context="Command line interface">
+	<type name="Window" context="Framsticks Theater">
 <description><![CDATA[Window object, used in the Framsticks Theater application.
 This class has no corresponding static object. If you want to use it, you have to create an object or get a reference to the existing object.
