Edit - View/Edit Fields... - Editable = Exception

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Edit - View/Edit Fields... - Editable = Exception

Marek Caltik
Hello Kosmo,
there is a tiny problem with the funkcionality available in Kosmo
1.2.1 (EN language). Select any PostGis layer and try menu Edit -
View/Edit Fields... - check Editable checkbox to start editing on that
layer. Result is NullPointerException reported to user. No visible
problem I haven't found, layer is editable and selection restored.

In detail we are in file
saig-core/src/com/vividsolutions/jump/workbench/ui/plugin/EditablePlugIn.java,
and the exception is thrown on this line:

SelectionManager selectionManager =
context.getLayerViewPanel().getSelectionManager();

Sometimes context doesn't have "layerViewPanel".
We have made a simple workaround, just to test if
context.getLayerViewPanel() is null - then we avoid following block of
code.
I'm not so deep in Kosmo, my solution can be stupid (despite of it
works), please check it.

regards
Marek Caltik
Gista s.r.o.
_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int
Reply | Threaded
Open this post in threaded view
|

Re: Edit - View/Edit Fields... - Editable = Exception

Sergio Baños Calvo
Good morning Marek.

We'll check it as soon as possible and send the patch for the 1.2.1
version. The solution that you have pointed may be correct, but it's
needed to check why the context doesn't have a layerviewpanel at that point.

Thanks for helping in improve Kosmo - Desktop client.

Regards,

Marek Caltik escribió:

> Hello Kosmo,
> there is a tiny problem with the funkcionality available in Kosmo
> 1.2.1 (EN language). Select any PostGis layer and try menu Edit -
> View/Edit Fields... - check Editable checkbox to start editing on that
> layer. Result is NullPointerException reported to user. No visible
> problem I haven't found, layer is editable and selection restored.
>
> In detail we are in file
> saig-core/src/com/vividsolutions/jump/workbench/ui/plugin/EditablePlugIn.java,
> and the exception is thrown on this line:
>
> SelectionManager selectionManager =
> context.getLayerViewPanel().getSelectionManager();
>
> Sometimes context doesn't have "layerViewPanel".
> We have made a simple workaround, just to test if
> context.getLayerViewPanel() is null - then we avoid following block of
> code.
> I'm not so deep in Kosmo, my solution can be stupid (despite of it
> works), please check it.
>
> regards
> Marek Caltik
> Gista s.r.o.
> _______________________________________________
> Kosmo_int mailing list
> [hidden email]
> http://lists.saig.es/mailman/listinfo/kosmo_int
>
>  


--

Sergio Baños Calvo

Jefe de desarrollos
Sistemas Abiertos de Información Geográfica, S.L. (SAIG S.L.)
Tlfno. móvil: 685005960
Tlfno. fijo: (+34) 954788876

E-mail: [hidden email]

_______________________________________________
Kosmo_int mailing list
[hidden email]
http://lists.saig.es/mailman/listinfo/kosmo_int