[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [udig-devel] Help with adding layers | 
Hello all,
I'm having trouble with my icons especially with the events that fire when 
the user clicks on them.  I understand that the AbstractActionTool is used 
for a basic icon where the user can simply click on it once to fire an 
event.
However, I'm just starting to learn uDig and I'm becoming more efficianty 
with Java although I'm still learning.  I recently hacked a piece of code 
from the Internet that enables the user to add a layer I tried to use the 
AbstractActionTool extension with the code but it gave me an error
message stating "the type AddLayer must implement the inherited abstract 
method Tool.dispose()"
AddLayer is my class name.  Whenever I use the AbstractCommand implements 
UndoableCommand when the user clicks the icon nothing happens so I created 
another class using the AbstractActionTool extension and called my other 
class from its run method.  This now fires the event but the layer is null 
when it's clicked giving me a java.lang.NullPointerException.  Its obviously 
wrong so can anyone shed some light on this problem?
James.
_________________________________________________________________
Play your part in making history - Email Britain! 
http://www.emailbritain.co.uk/