Create account / Log in

VASSAL 3.2.0 tomorrow?

Discussion area for the development team.

Moderators: Tim M, uckelman

Re: VASSAL 3.2.0 tomorrow?

Postby JoelCFC25 » November 9th, 2012, 1:59 am

Hah, I recognize that as the scolding lady on the PA system at Schiphol.
JoelCFC25
 
Posts: 591
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: VASSAL 3.2.0 tomorrow?

Postby Brent Easton » November 19th, 2012, 10:42 pm

I have resolved the problems with using property names with - signs in them in BeanShellExpressions. Vassal should now correctly convert a reference to a property name X-Men to GetProperty("X-Men"). This will occur when using any property name that does not follow the Java Variable naming convention. Using the Insert functionality of the Expression Builder does this automatically, but developers typing in their own expressions will need to be aware of this.
User avatar
Brent Easton
 
Posts: 2757
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: VASSAL 3.2.0 tomorrow?

Postby Brent Easton » November 19th, 2012, 11:15 pm

There's no difference in piece alignment.


Joel,
As far as I can tell, this is a bug that has always been there so you won't see any difference between 3.1 and 3.2.

The issue is that the snap-to point for a hex grid is not actually in the centre of the each hex. If you look closely at your example above, you can see that the square counter is just touching the hex grid at the top left, but is a couple of pixels clear at the bottom right.

This is not a good example because this grid is part of the map, but I confirmed it is an issue by testing on a map where the grid and centre points are drawn by vassal. I then created a dummy semi-transparent counted where the centre point is highlighted and it is clear that the centre of the counter is not on the centre point of the hex.

The Snap-to centre code and the hex grid drawing code use different code to calculate the hex centre and they are not producing the same results. The Snap-to code is generating co-ords a couple of pixels off-centre.
User avatar
Brent Easton
 
Posts: 2757
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: VASSAL 3.2.0 tomorrow?

Postby barbanera » November 20th, 2012, 1:14 pm

Brent Easton wrote:I have resolved the problems with using property names with - signs in them in BeanShellExpressions. Vassal should now correctly convert a reference to a property name X-Men to GetProperty("X-Men"). This will occur when using any property name that does not follow the Java Variable naming convention. Using the Insert functionality of the Expression Builder does this automatically, but developers typing in their own expressions will need to be aware of this.


Great news, Brent, thank you. Do I understand correctly and I should now use GetProperty("X-Men_playing") wherever I was using just $X-Men_playing$ before? What about $playerSide$_playing where $playerSide$ resolves to X-Men?

Any chance you could expand your fix to empty spaces and (), i.e. round brackets, in variable names? Thanks.
barbanera
 
Posts: 377
Joined: January 12th, 2012, 2:27 pm

Re: VASSAL 3.2.0 tomorrow?

Postby uckelman » November 20th, 2012, 8:43 pm

Thus spake Brent Easton:
> I have resolved the problems with using property names with - signs in
> them in BeanShellExpressions. Vassal should now correctly convert a
> reference to a property name X-Men to GetProperty("X-Men"). This will
> occur when using any property name that does not follow the Java
> Variable naming convention. Using the Insert functionality of the
> Expression Builder does this automatically, but developers typing in
> their own expressions will need to be aware of this.

I've merged these changes to trunk@8431, and uploaded 3.2.0-svn8431:

http://www.vassalengine.org/~uckelman/builds/

Barbanera, does this solve the problem for you?

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8138
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: VASSAL 3.2.0 tomorrow?

Postby barbanera » November 20th, 2012, 10:22 pm

uckelman wrote:I've merged these changes to trunk@8431, and uploaded 3.2.0-svn8431:

http://www.vassalengine.org/~uckelman/builds/

Barbanera, does this solve the problem for you?


I am happy to report that it works straight out of the box: the error with a layer following the X-Men_playing variable is now gone.

I am not sure I understand the instructions Brent gave - as I had to do nothing except install this latest build to have it work again - but insofar minus signs and/or empty spaces and/or round brackets are still supported in expression builders and Vassal 3.2.0 in general I am pretty happy.

Thanks!
barbanera
 
Posts: 377
Joined: January 12th, 2012, 2:27 pm

Re: VASSAL 3.2.0 tomorrow?

Postby Brent Easton » November 21st, 2012, 12:07 am

Any chance you could expand your fix to empty spaces and (), i.e. round brackets, in variable names? Thanks.


Should have been covered by the same fix.

I am not sure I understand the instructions Brent gave


I just wanted to point out that if you click on the Calculator icon and then feel confident enough to type in your own BeanShell Expression, then you have to be aware that to access any properties with spaces, parentheses, hyphens or other odd characters ($ and _ are ok), then you will have to use GetProperty("Funny property (name)") rather than the property name itself. If you use the 'Insert' button to select a property name from the drop-down list, then Vassal will do this for you automatically.
User avatar
Brent Easton
 
Posts: 2757
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: VASSAL 3.2.0 tomorrow?

Postby ertiyu » November 24th, 2012, 8:50 am

Hello
if no property in "list" of "turn counter" bug appears when I used the "expression builder".
sorry for my english I pass by google translation
I'm French.

cordially
ertiyu
 
Posts: 22
Joined: September 16th, 2010, 6:46 pm

Re: VASSAL 3.2.0 tomorrow?

Postby uckelman » November 24th, 2012, 11:25 am

Thus spake ertiyu:
> Hello
> if no property in "list" of "turn counter" bug appears when I used the
> "expression builder".
> sorry for my english I pass by google translation
> I'm French.

I can't find the expression builder you're referring to. Is anyone else
able to replicate this?

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8138
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: VASSAL 3.2.0 tomorrow?

Postby ertiyu » November 24th, 2012, 5:06 pm

^ ^ better than speech

Version without bug
https://dl.dropbox.com/u/65597666/No% 20bug

Version bug
https://dl.dropbox.com/u/65597666/Bug

The bug appears when inserting "calculated property" in this piece in the "game room prototype definition" or any other function with the "expression Builder".

By cons, if "list" of "turn tell" is cancel service works!

In addition, if a property is placed in "list" does it work
And once removed the bug do not come back.
ertiyu
 
Posts: 22
Joined: September 16th, 2010, 6:46 pm

Re: VASSAL 3.2.0 tomorrow?

Postby uckelman » November 24th, 2012, 10:14 pm

Thus spake ertiyu:
> ^ ^ better than speech
>
> Version without bug
> https://dl.dropbox.com/u/65597666/No[1]% 20bug
>
> Version bug
> https://dl.dropbox.com/u/65597666/Bug[2]
>
> The bug appears when inserting "calculated property" in this piece in
> the "game room prototype definition" or any other function with the
> "expression Builder".
>
> By cons, if "list" of "turn tell" is cancel service works!
>
> In addition, if a property is placed in "list" does it work
> And once removed the bug do not come back.
>
> [1] https://dl.dropbox.com/u/65597666/No
> [2] https://dl.dropbox.com/u/65597666/Bug
>

Try the 3.2.0-svn8432 build:

http://www.vassalengine.org/~uckelman/builds/

Is this better?

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8138
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: VASSAL 3.2.0 tomorrow?

Postby ertiyu » November 25th, 2012, 7:37 pm

GOOD :!: :!:

Great work! :wink:

no bug with version 3.2.0-svn8432 build

Thank.
ertiyu
 
Posts: 22
Joined: September 16th, 2010, 6:46 pm

Previous

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron