December 2016


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
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Thu, 29 Dec 2016 16:16:18 +0100
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.


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:
> 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, 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:
> 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