Vassal 3.7 Beta 5

Appreciate the new visual expression using multiple lines. Sure beats having to drag the open window across 2 monitors to see the entire expression (and YES I do some very long expressions).
But. Is not there always a but.
The windows (using windoze) focus for the ENTER key stroke is now no longer on the OK button. It acts as an enter key using (say) word, as in press ENTER and it starts a new line in the expression window, not accepting what has already being input and closing the expression window.
I have been loving that window focus, saves a lot of mouse moves to click on OK. Do not like losing that. Besides, I note that the expressions window automatically wraps text when the limit of the expression ‘pane’ is reached. So why the loss of ‘focus’? Would having a ‘hard’ enter command stuff up the expression builder?

Can we also do something about the so called error log. It logs everything, not just errors. I get an error, I have to wait and wait and wait until the error log finally lists everything. Annoying after a few game piece, with deck, inter alia refreshes.
Why cannot the ‘error log’ stick with that - logging errors, not the minute details of everything.

errorLog was a poor choice of name for it, way back at the beginning. Unfortunately, it would be too confusing to rename the errorLog in V3—we’d be endlessly explaining that the errorLog is now the system log.

Prompting the latter is an error message that states ‘- Bad Data in Module: Source: {2ndcyclecost+2} Error: Expression evaluation error. See the errorlog for more details.’
Is this another case of Vassal refusing to recognise text when said text is preceded by a number? Geez, if it is not a number, by itself, and accompanied by non numerical characters then it must be text. Most definitively NOT a number. There has to be a better way of differentiating between those that are actually numbers and those are actually text, regardless of what their first character is.

You might want to try the debugger instead, I find it helps with this issue.
From the chat window, to see the most recent part of the log, type:

/errorlog show n

where n is the number of errorlog lines that you want to display.

Thanks for that. Never knew that. Not an unknown quantity with me :-). Sadly I’ve also run a couple more refreshes so I have no idea what number to enter.
While that solves the immediate situation, it does not address the matter of an error log being actually a text log file of everything vassal does/encounters/etc. Call it a process log, process listing log or what ever. It is not an error log - a log that lists errors.

Agreed. It will not be called an errorLog in V4.

I would prefer it remain an error log that lists errors. After all, what is the main aim of this log? To list errors so users can post same to this site for analysis. Surely it would also be easier for you guys if you got an error log that you did not have to wade through to get to the actual error.

BTW Joel, thank you for you rapid response.

But I fear the original post may have been overlooked in this side matter.

If I have go through all 1371 naval units to rename that marker to, say ‘cycle2cost’ in lieu of ‘2ndcyclecost’ then so be it. A pain in the proverbial, but if needs must, then so be it.
Trouble is I cannot just use the ‘multi-piece editor’ as every piece after the first will just inherit the same trait from the first. Some things via this method work great, some suck. Changing a common trait will always result in this effect.
I thought the ‘leading zero’ fix was supposed to get around this.

The aim of the errorLog has always been to be a system log. It’s misnamed, as I said.

That would be worse, not better. Logging everything in one place ensures that we get all of the relevant information when there’s a problem. Non-error log messages are useful in most cases for establishing the state of things.


Perfect use case for editing the buildfile. Takes 30 seconds. Make sure you take backups.

Has nothing to do with the expression engine handling of property names. 2ndcyclecost is not a number, its a variable name. The underlying expression evaluation engine Beanshell is a Java interpreter and variable names in Java are not allowed to start with a number. There is nothing I can do about that. Same issue as using property names with spaces or odd characters in them, you have to use GetProperty(“name”) to access them in a {} Beanshell expression.

I will look into the Enter issue, but Expressions can now be multi-line to make them more readable and include comments, rather than just have them splat across multiple lines due to end of line wrapping. It seemed logical to implement Enter as a proper Carriage Return.

1 Like

I haven’t tried the Beta yet, so pardon me if this already works, but I know a lot of multi-line editor widgets are configured to allow Ctrl-Enter to trigger the default button instead of plain Enter.

1 Like

Not sure either, sounds like a good idea.

Yes, Ctrl-Enter works already, looks like it is a Swing Default for JTextArea elements.

1 Like

Actually more a case of notepad ++ compare. copy paste. Takes a lot longer than 30 seconds.

Remember, I have 3 modules and I’m somewhat loathe to do a quickie. There is always, somewhere, a find/replace, that will stuff up everything.

Yes, pressing enter within an expression to create a new line is good, but proper wraparound does not need this - it just does it.

Mind you, I really like the multi line expressions. But, do we have to use a monospaced font? Even courier would be good (I prefer Arial).

It’s not about arbitrary wrap-around, it’s about being able to create and format multi-line expressions with the wraps where you want them to make very long expressions readable and maintainable. The proper method in this case is that Enter enters a new line and Ctrl-Enter activates the OK button.This has been imposed automatically by Java Swing (out UI).

Sorry, why do you need to change anything at all? Have I missed something, what’s suddenly broken?

Generally, for code display and formatting, a monospaced font is better so things can be aligned properly. I’ll look at changing to another monospaced font like Courier if it is available.

I ask Java for the generic font “monospaced” which should select a suitable, monospaced font available on your system. On my system, this looks like it is Courier New, I would be surprised if it was anything different on any other windows system?

1 Like

Why was the below change made to Beta-5?
12538: Scenario Options - Allow Observers to Lock option tabs if no Sides taken

I don’t expect Observers to be able to change game states…