MASON-INTEREST-L Archives

December 2016

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Thu, 29 Dec 2016 16:16:18 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
That was an interesting bug to track down -- it has nothing to do with circles, but rather it turns out that selection hadn't been copied over from the non-hexagonal grid code to the hexagonal grid code.

I've verified it works for the Sparse grid situation. I've also updated the Dense grid situation and the Object grid situation but haven't tested them. I'm committing now, tell me if it looks better.

Sean

On Dec 29, 2016, at 5:10 AM, Marshall <[log in to unmask]> wrote:

> Hi-
>
> CircledPortrayal2D is working correctly for me using ObjectGridPortrayal2D but not using HexaObjectGridPortrayal2D.
>
> With the HexaObjectGrid2D, the circle that ObjectGrid2D is supposed to produce does appear if it’s turned on always (when passing false to the constructor for the onlyCircleWhenSelected argument).
>
> However, when onlyCircleWhenSelected is true, clicking on the underlying simple portrayal has no effect: The circle doesn’t appear (the inspector appears inspector tab with a double-click, though). If I switch to using ObjectGridPortrayal2D, the only-when-selected behavior works normally.
>
> The problem is illustrated here: https://github.com/mars0i/masonborder/tree/master/students
> The code as I’ve left it uses HexaObjectGridPortrayal2D, so if you click on the square in the middle of the display, nothing will happen in the display. However, if you delete the two instances of “Hexa” in line 16 in StudentsWithUI.java, a blue circle will appear around the square when it’s clicked.
>
> I tried clicking all around the square, too—I thought that maybe something was out of sync in the way in which HexaObjectGridePortrayal2D shifts the displayed positions of the underlying rectangular grid. This experiment was unsuccessful.
>
> I’ve also looked for information in the manual and the classdocs that would indicate that CircledPortrayal2D isn’t supposed to work with HexaObjectGridPortrayal2D, but haven’t found anything that suggests that it wouldn’t work.
>
> The symptoms seem identical to those in an earlier issue with SparseGrid2D and SparseGridPortrayal2D:
> https://listserv.gmu.edu/cgi-bin/wa?A2=ind1108&L=MASON-INTEREST-L&D=0&1=MASON-INTEREST-L&9=A&I=-3&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=5481
> In that case, the problem was in SparseGrid2D. In this case, the underlying grid is the same, though, both for the working and non-working versions: It’s an ObjectGrid2D.
>
> Thanks!
>
> Marshall

ATOM RSS1 RSS2