From: Chris B. <cbe...@ec...> - 2004-08-23 21:15:04
|
Well, that was fast! I've made so many discoveries and changes to the code I guess I stopped looking for simple things. I moved the setXY() out of buildModel() and into buildDisplay() after constructing the main objects and the display does work now. However, clicking the Step button produces no effect in the agent behavior, so either I'm not calling the right method for updating the display or the agent isn't implemented correctly (or something else :). I'll continue to investigate and when the code looks submittable I'll let you know. Regarding the lack of errors, I'm stuck using Windows ME for the time being, and I've noticed a number of instances of strange behavior such as widgets not being redrawn correctly, so it's quite possible that RePast is throwing the errors but I just don't see them. When I run the old code, the GUI simply hangs. Ah well, can't let that stop me. Thanks for your help. -Chris. ~~~~~~~~~~~~~~~~~ Chris Bennett Eco-Metrics, Inc. cbe...@ec... Nick Collier wrote: >Chris, > >I'm a bit puzzled by the code. I would think you'd get some errors when you >run it because you add the agents to the space in setXY which is called in >buildModel(), but the space has not be created yet. Its created in >buildDisplay() which is called after buildModel() in begin(). Specifically, >I would have thought that the call to setXY would throw a >NullPointerException. > >Thanks for you offer to contribute the model as a bootstrap for beginners. >Much appreciated. > >Nick > > > > |