Changeset 491 for java


Ignore:
Timestamp:
03/30/16 23:16:03 (9 years ago)
Author:
sz
Message:

Framsticks v 5.0rc5 release - many important objects have been renamed (property, ExpProperties?, NeuroProperties?, etc) making most scripts incompatible

Location:
java/Framclipse/com.framsticks.framclipse/res
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • java/Framclipse/com.framsticks.framclipse/res/framscontext.xml

    r440 r491  
    1313      <context name="Global context"/>
    1414    </code>
    15     <properties from="prop" to="ExpParams"/>
     15    <properties from="property" to="ExpProperties"/>
    1616    <properties from="stat" to="ExpState"/>
    1717  </file>
     
    2525      <context name="Global context"/>
    2626    </code>
    27     <properties from="prop" to="Fields"/>
     27    <properties from="property" to="NeuroProperties"/>
    2828  </file>
    2929
     
    3636      <context name="Global context"/>
    3737    </code>
    38     <properties from="prop" to="VisParams"/>
     38    <properties from="property" to="VisProperties"/>
    3939  </file>
    4040
     
    4848      <context name="Global context"/>
    4949    </code>
    50     <properties from="prop" to="ShowParams"/>
     50    <properties from="property" to="ShowProperties"/>
    5151  </file>
    5252
  • java/Framclipse/com.framsticks.framclipse/res/framscript.xml

    r469 r491  
    123123                        <description><![CDATA[Deprecated. Use population instead.]]></description>
    124124                </element>
    125                 <element name="population" type="untyped" flags="35"/>
     125                <element name="population" type="Population" flags="35"/>
    126126                <element name="index" type="integer" flags="35">
    127127                        <description><![CDATA[Note that the index changes depending on the current creature position in the population. Use Creature.uid if you need a permanent identifier that persists through the entire object lifetime.]]></description>
     
    190190                <element name="numjoints" type="integer" flags="3"/>
    191191                <element name="numneurons" type="integer" flags="3"/>
    192                 <element name="user1" type="untyped"/>
    193                 <element name="user2" type="untyped"/>
    194                 <element name="user3" type="untyped"/>
     192                <element name="data" type="Dictionary" flags="32768"/>
     193                <element name="user1" type="untyped" deprecated="true" flags="8192"/>
     194                <element name="user2" type="untyped" deprecated="true" flags="8192"/>
     195                <element name="user3" type="untyped" deprecated="true" flags="8192"/>
    195196                <element name="move" function="true" type="void" flags="32">
    196197                        <description><![CDATA[Shift the creature by a given vector.]]></description>
     
    442443                        <description><![CDATA[Center of gravity]]></description>
    443444                </element>
    444                 <element name="user1" type="untyped"/>
    445                 <element name="user2" type="untyped"/>
    446                 <element name="user3" type="untyped"/>
     445                <element name="data" type="Dictionary" flags="32768"/>
     446                <element name="user1" type="untyped" deprecated="true" flags="8192"/>
     447                <element name="user2" type="untyped" deprecated="true" flags="8192"/>
     448                <element name="user3" type="untyped" deprecated="true" flags="8192"/>
    447449                <element name="orient" type="Orient" flags="32">
    448450                        <description><![CDATA[By convention, the orientation of the creature is equal to the orientation of its first Part]]></description>
     
    513515                        <description><![CDATA[The resulting clone is a shallow copy (contains the same object references as the original). A deep copy can be obtained through serialization: String.deserialize(String.serialize(object));]]></description>
    514516<arguments/></element>
     517                <element name="assign" function="true" type="void" flags="256">
     518                        <description><![CDATA[Replaces current dictionary with dictionary contents from another object.]]></description>
     519                        <arguments>
     520                                <argument type="untyped"/>
     521                        </arguments>
     522                </element>
    515523        </type>
    516524        <type name="File" context="Global context">
     
    630638<arguments/></element>
    631639                <element name="pathseparator" type="string" flags="33"/>
     640                <element name="callURL" function="true" type="Dictionary" flags="32">
     641                        <arguments>
     642                                <argument name="url" type="string"/>
     643                                <argument name="post data or null" type="untyped"/>
     644                                <argument name="callback or null" type="FunctionReference"/>
     645                        </arguments>
     646                </element>
    632647        </type>
    633648        <type name="FunctionReference" context="Global context">
     
    720735                </element>
    721736                <element name="add" function="true" type="Genotype" flags="34">
    722                         <description><![CDATA[Creates a new Genotype from the supplied Genotype, Geno or string.
     737                        <description><![CDATA[Creates a new Genotype from the supplied Geno or string.
    723738Returns the created Genotype.]]></description>
    724739                        <arguments>
    725                                 <argument name="genotype object or geno object or string genotype" type="untyped"/>
     740                                <argument name="geno object or string genotype" type="untyped"/>
    726741                        </arguments>
    727742                </element>
     
    13571372                <element name="f1_smComma" type="float" min="0" max="100" default="0.02"/>
    13581373                <element name="f1_smModif" type="float" min="0" max="100" default="0.1">
    1359                         <description><![CDATA[Modifiers: LlRrCcQqFfMmIiWwEeAaSsDdGgBbHh]]></description>
     1374                        <description><![CDATA[Modifiers: LlRrCcQqFfMmIiEeWwAaSsDdGgBbHh]]></description>
    13601375                </element>
    13611376                <element name="f1_mut_exmod" type="string" max="30">
    13621377                        <description><![CDATA[Modifiers that will not be added nor deleted during mutation
    1363 (all: LlRrCcQqFfMmIiWwEeAaSsDdGgBbHh)]]></description>
     1378(all: LlRrCcQqFfMmIiEeWwAaSsDdGgBbHh)]]></description>
    13641379                </element>
    13651380                <element name="f1_nmNeu" type="float" min="0" max="100" default="0.05">
     
    15981613                </element>
    15991614                <element name="convtrace1" type="string" flags="3"/>
    1600                 <element name="user1" type="untyped"/>
    1601                 <element name="user2" type="untyped"/>
    1602                 <element name="user3" type="untyped"/>
     1615                <element name="data" type="Dictionary" flags="32768"/>
     1616                <element name="user1" type="untyped" deprecated="true" flags="8192"/>
     1617                <element name="user2" type="untyped" deprecated="true" flags="8192"/>
     1618                <element name="user3" type="untyped" deprecated="true" flags="8192"/>
    16031619                <element name="mutate" function="true" type="void"><arguments/></element>
    16041620                <element name="isValid" type="integer" min="0" max="1" deprecated="true" flags="8227">
     
    16501666                        </arguments>
    16511667                </element>
    1652                 <element name="copyTo" function="true" type="Genotype" flags="32">
    1653                         <description><![CDATA[returns the duplicate genotype, created in the target pool]]></description>
    1654                         <arguments>
    1655                                 <argument name="pool" type="GenePool"/>
    1656                         </arguments>
    1657                 </element>
     1668                <element name="clone" function="true" type="Genotype" flags="32">
     1669                        <description><![CDATA[Returns a duplicated genotype, not attached to any gene pool. All genotype fields are copied including 'data' (for which Dictionary.clone() produces a shallow copy).]]></description>
     1670<arguments/></element>
    16581671                <element name="delete" function="true" type="void" flags="32"><arguments/></element>
    16591672                <element name="deleteOne" function="true" type="void" flags="32">
    16601673                        <description><![CDATA[]]></description>
    16611674<arguments/></element>
    1662                 <element name="genepool" type="untyped" flags="35">
     1675                <element name="genepool" type="GenePool" flags="35">
    16631676                        <description><![CDATA[GenePool object or null when not in pool]]></description>
    16641677                </element>
     
    16721685        <type name="Interface" context="Global context">
    16731686<description><![CDATA[Used to query for object member descriptions. Example:
    1674 var iface=Interface.makeFrom(someobject); var description="this object has "+iface.properties+" properties, first property is "+iface.getId(0);]]></description>
     1687var iface=Interface.makeFrom(someobject); var description="this object has "+iface.size+" properties, first property is "+iface.getId(0);]]></description>
    16751688                <element name="name" type="string" flags="257"/>
    1676                 <element name="properties" type="integer" flags="257"/>
     1689                <element name="size" type="integer" flags="257"/>
    16771690                <element name="groups" type="integer" flags="257"/>
    16781691                <element name="get" function="true" type="untyped" flags="256">
     
    22102223                <element name="part" type="MechPart" flags="1"/>
    22112224                <element name="joint" type="MechJoint" flags="1"/>
    2212                 <element name="fields" type="Fields" flags="1">
    2213                         <description><![CDATA[Neurons can have different fields depending on their class. Script neurons have their fields defined using the "prop:" syntax. If you develop a custom neuron script you should use the Fields object for accessing your own neuron fields. The Neuro.fields property is meant for accessing the neuron fields from the outside script.
     2225                <element name="neuroproperties" type="NeuroProperties" flags="1">
     2226                        <description><![CDATA[Neurons can have different fields depending on their class. Script neurons have their fields defined using the "property:" syntax. If you develop a custom neuron script you should use the NeuroProperties object for accessing your own neuron fields. The Neuro.neuroproperties property is meant for accessing the neuron fields from the outside script.
    22142227Examples:
    22152228var c=Populations.createFromString("X[N]");
    2216 Simulator.print("standard neuron inertia="+c.getNeuro(0).fields.in);
     2229Simulator.print("standard neuron inertia="+c.getNeuro(0).neuroproperties.in);
    22172230c=Populations.createFromString("X[Nn,e:0.1]");
    2218 Simulator.print("noisy neuron error rate="+c.getNeuro(0).fields.e);
     2231Simulator.print("noisy neuron error rate="+c.getNeuro(0).neuroproperties.e);
    22192232
    22202233The Interface object can be used to discover which fields are available for a certain neuron object:
    22212234c=Populations.createFromString("X[N]");
    2222 var iobj=Interface.makeFrom(c.getNeuro(0).fields);
     2235var iobj=Interface.makeFrom(c.getNeuro(0).neuroproperties);
    22232236var i;
    2224 for(i=0;i<iobj.properties;i++)
     2237for(i=0;i<iobj.size;i++)
    22252238 Simulator.print(iobj.getId(i)+" ("+iobj.getName(i)+")");]]></description>
    22262239                </element>
     
    26342647                </element>
    26352648                <element name="odeairdrag" type="float" min="0" max="0.5" default="0.01">
    2636                         <description><![CDATA[A drag force ("air drag") proportional to the velocity of mass centers of moving parts]]></description>
     2649                        <description><![CDATA[A drag force ("air drag") proportional to the velocity of mass centers of moving parts (ODE's "linear damping")]]></description>
     2650                </element>
     2651                <element name="oderotdrag" type="float" min="0" max="0.5" default="0.01">
     2652                        <description><![CDATA[Drag momentum acting on rotating bodies (ODE's "angular damping")]]></description>
    26372653                </element>
    26382654                <element name="odewaterdrag" type="float" min="0.001" max="1" default="0.5"/>
     
    32393255                </element>
    32403256                <element name="eval" function="true" type="void" flags="32">
    3241                         <description><![CDATA[The argument must be a complete statement, e.g. "return 2+2;" is valid, while "2+2" is not. The EvalError object is returned for invalid statements.
     3257                        <description><![CDATA[The argument must be a complete statement, e.g. "return 2+2;" is valid, while "2+2" is not. The Error object is returned for invalid statements.
    32423258Example:
    32433259var statement="function fun(a) {return a*a;} return fun(Math.pi);";
    32443260var result=Simulator.eval(statement);
    3245 if (typeof result=="EvalError")
     3261if (typeof result=="Error")
    32463262   Simulator.print("Error:"+result.message);
    32473263else
     
    33843400                <element name="populations" type="Populations" flags="35"/>
    33853401                <element name="genepools" type="GenePools" flags="35"/>
    3386                 <element name="expparams" type="ExpParams" flags="35"/>
     3402                <element name="expproperties" type="ExpProperties" flags="35"/>
    33873403                <element name="expstate" type="ExpState" flags="35"/>
    33883404                <element name="genman" type="GenMan" flags="35"/>
     
    34513467                </element>
    34523468                <element name="odeairdrag" type="float" min="0" max="0.5" default="0.01">
    3453                         <description><![CDATA[A drag force ("air drag") proportional to the velocity of mass centers of moving parts]]></description>
     3469                        <description><![CDATA[A drag force ("air drag") proportional to the velocity of mass centers of moving parts (ODE's "linear damping")]]></description>
     3470                </element>
     3471                <element name="oderotdrag" type="float" min="0" max="0.5" default="0.01">
     3472                        <description><![CDATA[Drag momentum acting on rotating bodies (ODE's "angular damping")]]></description>
    34543473                </element>
    34553474                <element name="odewaterdrag" type="float" min="0.001" max="1" default="0.5"/>
     
    39093928                <element name="f1_smComma" type="float" min="0" max="100" default="0.02"/>
    39103929                <element name="f1_smModif" type="float" min="0" max="100" default="0.1">
    3911                         <description><![CDATA[Modifiers: LlRrCcQqFfMmIiWwEeAaSsDdGgBbHh]]></description>
     3930                        <description><![CDATA[Modifiers: LlRrCcQqFfMmIiEeWwAaSsDdGgBbHh]]></description>
    39123931                </element>
    39133932                <element name="f1_mut_exmod" type="string" max="30">
    39143933                        <description><![CDATA[Modifiers that will not be added nor deleted during mutation
    3915 (all: LlRrCcQqFfMmIiWwEeAaSsDdGgBbHh)]]></description>
     3934(all: LlRrCcQqFfMmIiEeWwAaSsDdGgBbHh)]]></description>
    39163935                </element>
    39173936                <element name="f1_nmNeu" type="float" min="0" max="100" default="0.05">
     
    43964415                </element>
    43974416                <element name="eval" function="true" type="void" flags="32">
    4398                         <description><![CDATA[The argument must be a complete statement, e.g. "return 2+2;" is valid, while "2+2" is not. The EvalError object is returned for invalid statements.
     4417                        <description><![CDATA[The argument must be a complete statement, e.g. "return 2+2;" is valid, while "2+2" is not. The Error object is returned for invalid statements.
    43994418Example:
    44004419var statement="function fun(a) {return a*a;} return fun(Math.pi);";
    44014420var result=Simulator.eval(statement);
    4402 if (typeof result=="EvalError")
     4421if (typeof result=="Error")
    44034422   Simulator.print("Error:"+result.message);
    44044423else
     
    45414560                <element name="populations" type="Populations" flags="35"/>
    45424561                <element name="genepools" type="GenePools" flags="35"/>
    4543                 <element name="expparams" type="ExpParams" flags="35"/>
     4562                <element name="expproperties" type="ExpProperties" flags="35"/>
    45444563                <element name="expstate" type="ExpState" flags="35"/>
    45454564                <element name="genman" type="GenMan" flags="35"/>
     
    49134932                </element>
    49144933                <element name="deserialize" function="true" type="untyped">
    4915                         <description><![CDATA[Extracts objects from textual representation.]]></description>
     4934                        <description><![CDATA[Extracts objects from textual representation. Error object is returned if deserialization fails.
     4935Example:
     4936var ret=String.deserialize(something);
     4937if (typeof(ret)=="Error") Simulator.print("something is wrong: "+ret.message);]]></description>
    49164938                        <arguments>
    49174939                                <argument type="string"/>
     
    52275249                </element>
    52285250        </type>
    5229         <type name="ExpParams" context="Experiment definition">
     5251        <type name="ExpProperties" context="Experiment definition">
    52305252                <element name="clear" function="true" flags="34"/>
    52315253                <element name="add" function="true" flags="34"/>
     
    53555377                <element name="part" type="MechPart" flags="1"/>
    53565378                <element name="joint" type="MechJoint" flags="1"/>
    5357                 <element name="fields" type="Fields" flags="1">
    5358                         <description><![CDATA[Neurons can have different fields depending on their class. Script neurons have their fields defined using the "prop:" syntax. If you develop a custom neuron script you should use the Fields object for accessing your own neuron fields. The Neuro.fields property is meant for accessing the neuron fields from the outside script.
     5379                <element name="neuroproperties" type="NeuroProperties" flags="1">
     5380                        <description><![CDATA[Neurons can have different fields depending on their class. Script neurons have their fields defined using the "property:" syntax. If you develop a custom neuron script you should use the NeuroProperties object for accessing your own neuron fields. The Neuro.neuroproperties property is meant for accessing the neuron fields from the outside script.
    53595381Examples:
    53605382var c=Populations.createFromString("X[N]");
    5361 Simulator.print("standard neuron inertia="+c.getNeuro(0).fields.in);
     5383Simulator.print("standard neuron inertia="+c.getNeuro(0).neuroproperties.in);
    53625384c=Populations.createFromString("X[Nn,e:0.1]");
    5363 Simulator.print("noisy neuron error rate="+c.getNeuro(0).fields.e);
     5385Simulator.print("noisy neuron error rate="+c.getNeuro(0).neuroproperties.e);
    53645386
    53655387The Interface object can be used to discover which fields are available for a certain neuron object:
    53665388c=Populations.createFromString("X[N]");
    5367 var iobj=Interface.makeFrom(c.getNeuro(0).fields);
     5389var iobj=Interface.makeFrom(c.getNeuro(0).neuroproperties);
    53685390var i;
    5369 for(i=0;i<iobj.properties;i++)
     5391for(i=0;i<iobj.size;i++)
    53705392 Simulator.print(iobj.getId(i)+" ("+iobj.getName(i)+")");]]></description>
    53715393                </element>
     
    54245446                </element>
    54255447                <element name="convtrace1" type="string" flags="3"/>
    5426                 <element name="user1" type="untyped"/>
    5427                 <element name="user2" type="untyped"/>
    5428                 <element name="user3" type="untyped"/>
     5448                <element name="data" type="Dictionary" flags="32768"/>
     5449                <element name="user1" type="untyped" deprecated="true" flags="8192"/>
     5450                <element name="user2" type="untyped" deprecated="true" flags="8192"/>
     5451                <element name="user3" type="untyped" deprecated="true" flags="8192"/>
    54295452                <element name="mutate" function="true" type="void"><arguments/></element>
    54305453                <element name="isValid" type="integer" min="0" max="1" deprecated="true" flags="8227">
     
    54765499                        </arguments>
    54775500                </element>
    5478                 <element name="copyTo" function="true" type="Genotype" flags="32">
    5479                         <description><![CDATA[returns the duplicate genotype, created in the target pool]]></description>
    5480                         <arguments>
    5481                                 <argument name="pool" type="GenePool"/>
    5482                         </arguments>
    5483                 </element>
     5501                <element name="clone" function="true" type="Genotype" flags="32">
     5502                        <description><![CDATA[Returns a duplicated genotype, not attached to any gene pool. All genotype fields are copied including 'data' (for which Dictionary.clone() produces a shallow copy).]]></description>
     5503<arguments/></element>
    54845504                <element name="delete" function="true" type="void" flags="32"><arguments/></element>
    54855505                <element name="deleteOne" function="true" type="void" flags="32">
    54865506                        <description><![CDATA[]]></description>
    54875507<arguments/></element>
    5488                 <element name="genepool" type="untyped" flags="35">
     5508                <element name="genepool" type="GenePool" flags="35">
    54895509                        <description><![CDATA[GenePool object or null when not in pool]]></description>
    54905510                </element>
     
    55095529                        <description><![CDATA[Deprecated. Use population instead.]]></description>
    55105530                </element>
    5511                 <element name="population" type="untyped" flags="35"/>
     5531                <element name="population" type="Population" flags="35"/>
    55125532                <element name="index" type="integer" flags="35">
    55135533                        <description><![CDATA[Note that the index changes depending on the current creature position in the population. Use Creature.uid if you need a permanent identifier that persists through the entire object lifetime.]]></description>
     
    55765596                <element name="numjoints" type="integer" flags="3"/>
    55775597                <element name="numneurons" type="integer" flags="3"/>
    5578                 <element name="user1" type="untyped"/>
    5579                 <element name="user2" type="untyped"/>
    5580                 <element name="user3" type="untyped"/>
     5598                <element name="data" type="Dictionary" flags="32768"/>
     5599                <element name="user1" type="untyped" deprecated="true" flags="8192"/>
     5600                <element name="user2" type="untyped" deprecated="true" flags="8192"/>
     5601                <element name="user3" type="untyped" deprecated="true" flags="8192"/>
    55815602                <element name="move" function="true" type="void" flags="32">
    55825603                        <description><![CDATA[Shift the creature by a given vector.]]></description>
     
    60256046                <element name="twosided" type="integer" min="0" max="1"/>
    60266047        </type>
    6027         <type name="VisParams" context="Visual style definition">
     6048        <type name="VisProperties" context="Visual style definition">
    60286049                <element name="clear" function="true" flags="34"/>
    60296050                <element name="add" function="true" flags="34"/>
     
    70207041                <element name="changedPropertyId" type="string" flags="35"/>
    70217042        </type>
    7022         <type name="ShowParams" context="Framsticks Theater">
     7043        <type name="ShowProperties" context="Framsticks Theater">
    70237044                <element name="clear" function="true" flags="34"/>
    70247045                <element name="add" function="true" flags="34"/>
Note: See TracChangeset for help on using the changeset viewer.