[GRASS-dev] [GRASS GIS] #1978: module GUIs: "or enter values interactively" should be opt-in

GRASS GIS trac at osgeo.org
Sun May 26 03:39:29 PDT 2013

#1978: module GUIs: "or enter values interactively" should be opt-in
 Reporter:  hamish  |       Owner:  grass-dev@…              
     Type:  defect  |      Status:  new                      
 Priority:  normal  |   Milestone:  6.4.4                    
Component:  wxGUI   |     Version:  svn-trunk                
 Keywords:  parser  |    Platform:  All                      
      Cpu:  All     |  

 for the G_standard_input for input files, the auto-generated wx module
 GUIs are always asking "or enter values interactively" whenever
 G_define_standard_option(G_OPT_F_INPUT) is present.

 Since that makes no sense for binary input files, and anything automatic
 should err on the side of not being weird, the interactive version should
 be opt-in -- the programmer should have to use a special gisprompt in
 those cases. (e.g. r.in.gdal, v.in.ogr, r.in.bin (G6.x), r.in.mat, ...)

 fwiw section of the grass5 programmer's manual has a full
 description of what the a,b,c options of gisprompt were originally
 designed to be,
 {{{ gisprompt Member

 The gisprompt Option structure item requires a bit more description. The
 three comma-separated (no spaces allowed) sub-arguments are defned as

 First argument:
 "old" results in a call to the GRASS library subroutine G_ask_old, "new"
 to G_ask_new, "any" to G_ask_any, and "mapset" to G_ask_in_mapset.

 Second argument:
 This is identical to the "element" argument in the above subroutine
 calls. It specifes a directory inside the mapset that may contain the
 user's response.

 Third argument:
 Identical to the "prompt" argument in the above subroutine calls. This is
 a string presented to the user that describes the type of data element
 being requested.

 see lib/gis/ask.c for the "above subroutine calls".

 I first considered to mangling all the gisprompts by hand to stop the
 "interactive" text box but keep the Browse button, but then it occurs to
 me that the gui parser is the problem, not the modules. (also it seems the
 above a,b,c have been continually redefined since the tcltk gui days, so
 we should better sort out what it means now if gisprompt is to be
 different in grass7)


Ticket URL: <https://trac.osgeo.org/grass/ticket/1978>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list