<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 25, 2015 at 3:59 AM, Pietro <span dir="ltr"><<a href="mailto:peter.zamb@gmail.com" target="_blank">peter.zamb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi devs,<br>
<br>
may be I'm missing something stupid, but if I want to write a GRASS<br>
modules that takes two different vectors and allows for each vetor to<br>
select a column, something like:<br>
<br>
{{{<br>
#%module<br>
#% description: Test<br>
#% keyword: vector<br>
#%end<br>
#%option G_OPT_V_INPUT<br>
#% key: vect0<br>
#%end<br>
#%option G_OPT_V_FIELD<br>
#% key: vect0_layer<br>
#% required: no<br>
#%end<br>
#%option G_OPT_DB_COLUMN<br>
#% key: vect0_column_cost<br>
#%end<br>
#%option G_OPT_DB_COLUMN<br>
#% key: vect0_column_maintenance<br>
#%end<br>
#%option G_OPT_V_INPUT<br>
#% key: vect1<br>
#%end<br>
#%option G_OPT_V_FIELD<br>
#% key: vect1_layer<br>
#% required: no<br>
#%end<br>
#%option G_OPT_DB_COLUMN<br>
#% key: vect0_column_other<br>
#%end<br>
#%option G_OPT_V_OUTPUT<br>
#%end<br>
from pprint import pprint<br>
import grass.script.core as gcore<br>
<br>
<br>
def main(options, flags):<br>
    pprint(options)<br>
    pprint(flags)<br>
<br>
if __name__ == "__main__":<br>
    main(*gcore.parser())<br>
}}}<br>
<br>
How can I say to WxGui that vect0_column_cost should display a<br>
combobox with the available columns of the table linked with a layer<br>
specify in vect0_layer of the vector map with name specify in vect0?<br>
<br>
For the GRASS addons and GUI that we are developing we decide to use<br>
the same root word: "vect0" and "vect1" to link the different<br>
parameters to the vector, there are any better way to solve this? May<br>
be something that it is working natively in GRASS?<br>
<br></blockquote><div><br></div><div>There is 'guidependency' in parser, look at </div><div><a href="http://trac.osgeo.org/grass/changeset/64914">http://trac.osgeo.org/grass/changeset/64914</a><br></div><div><br></div><div>The problem is that in case of 2 vector inputs, the gui is not working properly - the layers and columns are not found for the second vector. I haven't look into it yet.</div><div><br></div><div>Anna</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Thank you for your help.<br>
<span class=""><font color="#888888"><br>
Pietro<br>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
</font></span></blockquote></div><br></div></div>