Hi Larry,
thank you! It works... perhaps I should make a pause... ;-)
regards,
Carl
----- Original Message -----
From: Larry Becker
To: OpenJump develop and use
Sent: Thursday, May 15, 2008 3:10 PM
Subject: Re: [JPP-Devel] add new Layer
Hi Carl,
Don't forget the geometry. You need to add something like:
fs.addAttribute("GEOMETRY", AttributeType.GEOMETRY);
regards,
Larry Becker
On Thu, May 15, 2008 at 3:59 AM, Carl Grönniger (entera) <[EMAIL PROTECTED]>
wrote:
Hi all,
I want to add a new layer with some attributes on buttonclick.
The BeanTools -> NewLayer.bsh makes the same in principle.
When I click the button, the new layer is added with the desired attributes.
But when I edit the layer, e.g. draw a line, I got this error:
-1 (Array Index Out Of Bounds Exception)
Where is my mistake? It's just the same like the bsh script..., or not??
this method is called when I click the button:
public void newTLayer(PlugInContext context, String string) {
FeatureSchema fs = new FeatureSchema();
fs.addAttribute("ID", AttributeType.STRING);
fs.addAttribute("Test", AttributeType.STRING);
fs.addAttribute("BlaBla", AttributeType.STRING);
FeatureDataset fc = new FeatureDataset(fs);
context.addLayer("Projekt", string, fc);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
--
http://amusingprogrammer.blogspot.com/
------------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------------------------
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel