Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Sunburned Surveyor
Ole has already identified and fixed my problem in OpenJUMP's RenderingManger class. The problem wasn't in the render(Object ContentID, boolean clearImageCache) method, but in my implementation of the createRenderer() method. When I received a null value in the render(Object ContentID) method cre

Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Sunburned Surveyor
Larry, Thanks for clarifying that. I'm going to compare the render() methods in JUMP, OpenJUMP, and in my modified code. When I changed the statement if (getRenderer(contentID).equals(null)) back to the statement if (getRenderer(contentID == null) the NullPointerException is generated in a la

Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Larry Becker
Wishful thinking. There are no layers in an empty project, so there are no renders. Larry On 5/21/07, Sunburned Surveyor <[EMAIL PROTECTED]> wrote: I just realized OpenJUMP isn't passing the LayerViewPanel or any other "phantom" object to the render() method. The only way the if (getRendere

Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Sunburned Surveyor
I just realized OpenJUMP isn't passing the LayerViewPanel or any other "phantom" object to the render() method. The only way the if (getRenderer(contentID).equals(null)) statement could be causing a NullPointerException is if OpenJUMP was passing the render() method a null value. I think it doe

Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Sunburned Surveyor
Larry, This makes sense. I didn't think about the fact that I was calling the Object.equals method in this line. I find your comments interesting because a Layer object is not passed to OpenJUMP when a project is first opened. Maybe this is why I can rendering works with no error when I load a Sh

Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Sascha L. Teichmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SS, Unit test is fine, but take a suggestion wrong an old coder: println debugging has its merits and setting a break point in your debugger to introspect some variables may save your day. ;-) - - Sascha Sunburned Surveyor schrieb: > Sascha, > > Th

Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Larry Becker
Hi SS, You said: The line that is generating the error mesage is this: if (getRenderer(contentID).equals(null)) The only way that could be true is if contentID is null. If I remember correctly, contentID is basically the layer object. Larry On 5/21/07, Sunburned Surveyor <[EMAIL PROTECTED]

Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Sunburned Surveyor
Sascha, This is how the method was coded first, and I still got the error message. I changed it today thinking that might fix the problem. Do you have any other ideas? The Sunburned Surveyor On 5/21/07, Sascha L. Teichmann <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash:

Re: [JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Sascha L. Teichmann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, What about rewriting getRenderer(contentID).equals(null) as getRenderer(contentID) == null ? - - Sascha Sunburned Surveyor schrieb: > I'm about ready to give up on this pluggable rendering system for > OpenJUMP. :] > > I created JUnit tests

[JPP-Devel] I could really use some help with this question on the RenderingManager...

2007-05-21 Thread Sunburned Surveyor
I'm about ready to give up on this pluggable rendering system for OpenJUMP. :] I created JUnit tests for the two main classes involved, namely RendererFactory and RegularRendererFactoryTool. All the JUnit tests for the public methods in both the classes pass with no problems now that I have made