Hello,
(note: newbie alert)
I have only recently discovered MASON, and am already "hooked" -- it's a
fantastic framework.
During my first steps I have now encountered a (minor) snag, perhaps someone
would be kind enough to supply the needed push forward.
My first "own" simulation is a simple field with agents just running around.
The basis is the very nice and instructive "School Yard" (Students) tutorial
in the MASON manual; this example works fine for me in all its stages.
I have then practically copy-pasted the code from the first stages of the
tutorial into my own simulation, except that:
-- all "buddy network" related stuff has been omitted;
-- I am using a toroidal SparseGrid2D field (and SparseGridPortrayal2D),
instead of Continuous2D*
The following all works fine indeed:
-- agents run around as expected, toroidal works, too;
-- agents can be double-clicked to bring up their inspector
in the Control Window;
-- agents can be directly moved (dragged by mouse)
The snag is about the green circle and black label used in the tutorial for
marking the selected agent:
In my code this does not work properly:
-- when they are displayed permanently, i.e. parameter
onlyCircleWhenSelected == false,
both circle and label are showing up fine, so there is no problem
with the graphics as such;
-- But when
onlyCircleWhenSelected == true,
i.e. label and circle only to be displayed when the agent is selected,
they are *not* shown.
In other words, while a *double* click on the agent is processed properly
(--> agent turns up in Inspector list), a *single* click for selecting the
agent is not, and seems to be ignored.
In case it matters: I am using MASON from within Eclipse, under Windows XP.
(But as said, no problems with the tutorial, so that's probably not an issue.)
What am I overlooking?
Does agent selection via mouse-click perhaps work differently with a
SparseGrid2D field (as compared to Continuous2D), or require special measures?
At the moment I am not quite sure even in which direction to dig.
Thanks in advance for any pointers!
Cheers,
Martin
|