[Gvsig_english] groovy

Jorge Sanz jsanz at prodevelop.es
Fri Aug 29 09:21:42 CEST 2008


Well,

For the example you provide, the scripting capabilities are far enough but if you need more complex functionality or GUI I recommend to start with Java (I'm not saying that it's easy!).

You have lots of extensions to watch as an example on the gvSIG source (e.g. extEventTheme), but I would recommend those slides[1] and the materials[2] (two gvSIG simple extensions).

The slides are in Spanish but have lots of eclipse IDE screenshots.

About the developers manual... Mario said on that list that the translation was in process but I've no idea about how it's going.

Anyway, as you start with your development, ask here any doubt. We know that we have some weakness with non-Spanish-spoken developers, we are working on that and we take care of you J

Regards

[1] http://tinyurl.com/gvsig-extensions-dev-slides

[2] http://tinyurl.com/gvsig-extensions-dev-sources

--

Jorge Gaspar Sanz Salinas

Ingeniero en Geodesia y Cartografía

Prodevelop S.L. - Valencia - España

Tlf.:  96.351.06.12 - Fax:   96.351.09.68 

jsanz[en]prodevelop[punto]es

http://www.prodevelop.es

 

De: gvsig_internacional-bounces at runas.cap.gva.es [mailto:gvsig_internacional-bounces at runas.cap.gva.es] En nombre de Robert Sanson
Enviado el: jueves, 28 de agosto de 2008 22:36
Para: Users and Developers mailing list
Asunto: RE: [Gvsig_english] groovy

 

Hi Jorge

 

I am new to gvSIG, and am wanting to work out the best way to write extensions for gvSIG. For instance, I want to be able to select an attribute value from a layer in the view based on a click location, and use that to execute a SQL statement against a database. I have been looking at options such as Jython and Groovy. Perhaps it is better to stick to Java? Has the developer's manual been translated to English yet? I tried to follow the link to the News item on the gvSIG web site, but did not find the manual:

 

https://gvsig.org/web/docdev/manual-for-developers-gvSIG

 

Many thanks,

 

Robert Sanson

>>> "Jorge Sanz" <jsanz at prodevelop.es> 28/08/2008 7:11 p.m. >>>

Hi Robert,

Do you want to execute groovy compiled classes or to execute dynamic compiled scripts?

I've tested recently the dynamic execution of groovy scripts in gvSIG (sorry but I haven't any examples here at work) loading the script files. I created a new extension (like any other gvSIG plugin) with its config.xml and so on. In my extension execute method I've tried to parse a groovy script[1].

One thing you should care about is to pass the extension classloader[2] to the compiler in order to let your groovy scripts to access gvSIG classes. I've successfully accessed andami classes (like PluginServices for example) but I've experienced casting problems with other libraries like FMap (to access for example to the active view's MapControl).

Anyway (IMHO) developing extensions for gvSIG is easier in Java than in scripting languages.

Regards

[1] http://groovy.codehaus.org/api/groovy/lang/GroovyShell.html#GroovyShell(java.lang.ClassLoader)

[2] http://groovy.codehaus.org/api/groovy/lang/GroovyShell.html#evaluate(java.io.File)

--

Jorge Gaspar Sanz Salinas

Ingeniero en Geodesia y Cartografía

Prodevelop S.L. - Valencia - España

Tlf.:  96.351.06.12 - Fax:   96.351.09.68 

jsanz[en]prodevelop[punto]es

http://www.prodevelop.es

De: gvsig_internacional-bounces at runas.cap.gva.es [mailto:gvsig_internacional-bounces at runas.cap.gva.es] En nombre de Robert Sanson
Enviado el: jueves, 28 de agosto de 2008 6:16
Para: Users and Developers mailing list
Asunto: Re: [Gvsig_english] groovy

Hi 

How can I use groovy scripting in gvSIG?

Many thanks,


Robert Sanson


------------------------------------------------------------------
The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.
------------------------------------------------------------------

This message has been scanned for malware by SurfControl plc. www.surfcontrol.com <http://www.surfcontrol.com/> 

 

Click here <https://www.mailcontrol.com/sr/UyMWDvXzbPjTndxI!oX7Ul4TPWxlZJ1aSJQ+lK9syuf!21ILXzPEZyCBT5!TwAWH2ZTBXr+ASFpGp10b+rkp2Q==>  to report this email as spam.

 


------------------------------------------------------------------
The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.
------------------------------------------------------------------

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://runas.cap.gva.es/pipermail/gvsig_internacional/attachments/20080829/789dfe5e/attachment.htm


More information about the Gvsig_internacional mailing list