Expression builder docs needed for 3.2.3

I think Vassal 3.2.3 should fix some issues with the expression builder.

First of all, the are links to an ExpressionBuilder.htm help page which is nowhere to be found in the docs.

Secondly, the “functions” seem to be buggy:

  1. opening the expression builder in a Calculated Property, say, then clicking on “Insert” and choosing a “Function”, then picking “Compare” and entering any two strings (like foo and bar) returns an error like java.lang.string.Compare not found

  2. same with the “If” function, I tried entering a logical expression like 1 == 1 and returning “true” if true and “false” if false, and it does not seem to return anything (I am using a text label to display the value of this calculated property);

  3. again with the “If” function, I tried changing the true/false above to 0,1 and got a Vassal BUG screen

How are Compare/If supposed to work, if at all?

Moreover, is there any web resource out there where one can find a simple but comprehensive reference list of all the java beanshells expressions/functions one can use? For example, I found that one can use things like Math.sqrt and Math.abs … but that was by sheer luck surfing the web back then… When I searched for beanshells again lately I could not find any usable reference list of supported functions… When I searched for java.lang.string I could not find any mention of Compare (but I found a compareTo)…

Thus spake barbanera:

I think Vassal 3.2.3 should fix some issues with the expression builder.

First of all, the are links to an ExpressionBuilder.htm help page which
is nowhere to be found in the docs.

This is Bug 9888 in our tracker:

vassalengine.org/tracker/sho … gi?id=9888

Secondly, the “functions” seem to be buggy:

  1. opening the expression builder in a Calculated Property, say, then
    clicking on “Insert” and choosing a “Function”, then picking “Compare”
    and entering any two strings (like foo and bar) returns an error like
    java.lang.string.Compare not found

  2. same with the “If” function, I tried entering a logical expression
    like 1 == 1 and returning “true” if true and “false” if false, and it
    does not seem to return anything (I am using a text label to display the
    value of this calculated property);

  3. again with the “If” function, I tried changing the true/false above
    to 0,1 and got a Vassal BUG screen

I can’t reproduce this with 3.2.6. Can you?


J.