|
From: | Marcus G. Daniels |
Subject: | Re: [Swarm-Support] Java Swarm Graphs |
Date: | Thu, 17 Nov 2005 15:40:52 -0700 |
User-agent: | Thunderbird 1.0+ (Windows/20050803) |
durga bhavani wrote:The purpose of this code should simply be to return the GraphImpl created in buildObjects, not to make another.
As for the rest, there's no point in illustrating a bunch of calls within a try/catch, or even using a try/catch unless you are told to by the compiler. Better to let it fail in a way so the line of the error is clear. If nothing else, put calls to System.err.println around a range of statements, and then tighten the boundary until the particular statement that failed is obvious.public Graph getgraph() { graph = new GraphImpl(getZone()); return graph; }
It's also not clear from your excerpts what the relationship of SimF and ObserverSwarm is. Again, if you are learning Swarm, and become confused by some behavior, you're far better off switching to small test programs than modifying a larger poorly understood body of code [that presumably aims to be your working simulation].
[Prev in Thread] | Current Thread | [Next in Thread] |