List of items in a combo-box or a list

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

List of items in a combo-box or a list

Luisa Peña
Greetings
I'm new at this mailing list, but I have been using GRASS for a While. But now, I need to create a script to process a few data but and I have a technical GUI-question:
I want to have an script-input to be a combo-box or a list of options. But, this list instead of being pre-defined (e.g. r.in.wms the key option format has a pre-defined list of possibilities that the user can select) I don't want to have a list of possible options Header but read from other source(e.g. global variables, text file, other variables). Is this possible? (Did I made myself clear?)

Thanks

Best regards
Luisa, Brazil

_______________________________________________
grass-gui mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-gui
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: List of items in a combo-box or a list

Glynn Clements

Luisa Peña wrote:

> I'm new at this mailing list, but I have been using GRASS for a While. But
> now, I need to create a script to process a few data but and I have a
> technical GUI-question:
> I want to have an script-input to be a combo-box or a list of options. But,
> this list instead of being pre-defined (e.g. r.in.wms the key option format
> has a pre-defined list of possibilities that the user can select) I don't
> want to have a list of possible options Header but read from other
> source(e.g. global variables, text file, other variables). Is this possible?
> (Did I made myself clear?)

You can't do this via g.parser. You would need to either dynamically
generate a script with a suitable header, or have the script create
the GUI itself using wxPython or Tcl/Tk.

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-gui mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-gui
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: List of items in a combo-box or a list

Luisa Peña
Hello Glynn

You can't do this via g.parser. You would need to either dynamically
generate a script with a suitable header,

Ah is it possible to have a script in which i have a dynamic script? Is there any available script/function, developed for GRASS, in which I can get some "inspiration"?

 
or have the script create
the GUI itself using wxPython or Tcl/Tk.

 
So you mean, instead of using g.parser, that reads wxpython file that define module, My script would have Wxpython code similar to the one, that g.parser uses, but with dynamic fields?

For instance, combo-boxes that lists available rasters/vectorial files in GRASS are dynamic. Right?

Thank you Glynn and everyone else for your help

Luisa

_______________________________________________
grass-gui mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-gui
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: List of items in a combo-box or a list

Glynn Clements

Luisa Peña wrote:

> > You can't do this via g.parser. You would need to either dynamically
> > generate a script with a suitable header,
>
>
> Ah is it possible to have a script in which i have a dynamic script? Is
> there any available script/function, developed for GRASS, in which I can get
> some "inspiration"?

I don't know of any examples of this approach.

> > or have the script create
> > the GUI itself using wxPython or Tcl/Tk.
>
> So you mean, instead of using g.parser, that reads wxpython file that define
> module, My script would have Wxpython code similar to the one, that g.parser
> uses, but with dynamic fields?
>
> For instance, combo-boxes that lists available rasters/vectorial files in
> GRASS are dynamic. Right?

Right.

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-gui mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-gui
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: List of items in a combo-box or a list

Wolf Bergenheim
In reply to this post by Luisa Peña
Have a look at v.krige[1]. It is written in python and fetches a list
of suitable vector maps dynamically[2]. It makes its own gui.

--Wolf

[1] http://trac.osgeo.org/grass/browser/grass/trunk/scripts/v.krige
[2] http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/scripts/vkrige.py#L75

On Wed, Apr 7, 2010 at 14:22, Luisa Peña <[hidden email]> wrote:

> Hello Glynn
>>
>> You can't do this via g.parser. You would need to either dynamically
>> generate a script with a suitable header,
>
> Ah is it possible to have a script in which i have a dynamic script? Is
> there any available script/function, developed for GRASS, in which I can get
> some "inspiration"?
>
>>
>> or have the script create
>> the GUI itself using wxPython or Tcl/Tk.
>>
>
> So you mean, instead of using g.parser, that reads wxpython file that define
> module, My script would have Wxpython code similar to the one, that g.parser
> uses, but with dynamic fields?
> For instance, combo-boxes that lists available rasters/vectorial files in
> GRASS are dynamic. Right?
> Thank you Glynn and everyone else for your help
> Luisa
> _______________________________________________
> grass-gui mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-gui
>
>



--
<8  )---- Wolf Bergenheim ----(  3>
_______________________________________________
grass-gui mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-gui
Loading...