Hi Eric,
Thanks for the bug report.
It's fixed and will be available in the next NB
(acually, the bug was in the Layer ComboBox listener, near line 235)
As it seems that you are using statistic plugins, I submit to you and
others a question about how to handle null values in this plugin.
Currently, it throws NPE :-( .
Different options are :
- interpret null values as 0 for integers or 0.0 for double (not so good
but easy)
- catch the exception (or check for null/NaN values before) and throw a
better message than NPE
- do the statistics ignoring every feature having a null value
Michaël
Le 02/11/2010 19:41, Eric Grosso a écrit :
Hi all,
I found a very little bug to correct in the ClassifyAttributes Plugin:
org.openjump.core.ui.plugin.tools.statistics.ClassifyAttributesPlugin
If we select a layer without any attributes, the GUI dialog doesn't
allow to select an attribute:
it is logical. But after that, if we select another layer which
contains some attributes, the attribute
selection is still disabled.
To correct this bug, the line 218:
if(listNumAttributes.size()==0)jcb_attribute.setEnabled(false);
should be replaced with:
if(listNumAttributes.size()==0){
jcb_attribute.setEnabled(false);
} else {
jcb_attribute.setEnabled(true);
}
Moreover, as it is allowed to click on the OK button even if there is
no attribute to deal with.
Indeed, it is impossible to disable this button due to the fact that
the OKCancelPanel is not
"gettable" from a MultiInputDialog. Therefore, an information or error
message should be
provided to users to ask them to choose/process a layer which contains
at least one attribute
(test in the run method ). If not, it provides a message error with a
"null exception" error.
Cheers,
Eric
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps& games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel