[GRASS-dev] [GRASS GIS] #1778: Typing in g.region without parameters does not open a g.region window

GRASS GIS trac at osgeo.org
Sun Sep 8 20:24:45 PDT 2013

#1778: Typing in g.region without parameters does not open a g.region window
 Reporter:  pvanbosgeo                  |       Owner:  grass-dev@…              
     Type:  defect                      |      Status:  new                      
 Priority:  normal                      |   Milestone:  7.0.0                    
Component:  Default                     |     Version:  svn-trunk                
 Keywords:  g.region, r.colors, r.mask  |    Platform:  Linux                    
      Cpu:  x86-64                      |  

Comment(by wenzeslaus):

 Removing the ''start GUI if no parameters'' behavior to ensure right
 behavior of scripts is not bad idea. However, don't think that there is a
 will to do it. I'm using this functionality a lot and as far as I know
 others too. And I never had a problem with empty `$args` (but I don't
 think I will not).

 So if we want ''start GUI if no parameters'' behavior, I think that the
 solution could be to provide a function in gpraser library to show the
 GUI. Module itself can check its parameters and when no parameters are
 set, instead of [http://geoinformatics.fsv.cvut.cz/pdf/geoinformatics-fce-
 ctu-2007-02.pdf NOP] (e.g., `g.region`) or error (e.g., `r3.colors`), it
 can call the function to show GUI. (By the way, `g.region` should do
 something, e.g. print error message, because NOP is not expected behavior
 even when writing script.)

 Note that this is can be a wide problem since a lot of (temporal-related)
 modules now accept multiple input (map names) parameter or file containing
 map names. (Correct me if I'm wrong.)

 Also note, that there is an unresolved problem of ''starting generated GUI
 vs hand-written GUI'' for a module ([http://lists.osgeo.org/pipermail
 /grass-dev/2013-February/062054.html Additional switch(es) for
 <g.mapsets>?], [http://osgeo-org.1560.x6.nabble.com/Additional-switch-es-
 for-lt-g-mapsets-gt-td5034689.html nabble]). There was even a diff (not
 sure if public) implementing the enforcing of generated GUI by `--ui`. But
 this is not ideal since it conflicts with standard use of `--ui` (it would
 mean that modules with no required parameters would not be eligible to
 have hand-written GUI).

Ticket URL: <https://trac.osgeo.org/grass/ticket/1778#comment:23>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list