[GRASS-dev] order of tabs in r.colors in 6.4

Just wondering, the "required" tab of the r.colors dialog sholdn't be
the first one? I found odd to see the "Options" first and the
"required" as the last one.

cheers

Carlos

--
+-----------------------------------------------------------+
Carlos Henrique Grohmann - Guano
Geologist M.Sc - Doctorate Student at IGc-USP - Brazil
Linux User #89721 - carlos dot grohmann at gmail dot com
+-----------------------------------------------------------+
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke

Can't stop the signal.

Carlos:

Just wondering, the "required" tab of the r.colors dialog sholdn't be
the first one? I found odd to see the "Options" first and the
"required" as the last one.

the way the tcl GUI module window is created works like this:
(not specifically that it should, but fyi it does)

the tab of the first defined flag comes first.
if not given the flag/option goes to the Options tab.
after the flags set the order the options set the order.

so in r.colors/main.c, -r is the first flag defined and it has no
guisection, so it (correctly) goes into the Options tab. After that the
other flags define a "Colors" tab, so that one comes next. After all the
flags the map= option is defined first and it creates the "Required" tab.

I think it is a bad mistake to go around reordering everything to make
the above funny rules happy. Better to put them in order so they make the
most sense for the .html help page and --help command line, then make the
GUI tab rules more controllable.

thanks Martin for reminding me about why the Required tab was needed, to
work around the "list $foo and exit" flag || map=required issue. As
earlier suggested by Glynn? we could fix that for next versions of GRASS
with a new flag->struct item which tells the parser not to worry about
testing all required options=. (and flags by definition can't be required
so as long as the flags are parsed first, it's do-able)

Hamish

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Hi,

2008/5/5 Carlos Guâno Grohmann <carlos.grohmann@gmail.com>:

Just wondering, the "required" tab of the r.colors dialog sholdn't be
the first one? I found odd to see the "Options" first and the
"required" as the last one.

I guess that you speak about TCL/TK GUI, see

http://trac.osgeo.org/grass/ticket/102

wxPython forces to put "Required" tab as the first one.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

Hi,

2008/5/5 Hamish <hamish_b@yahoo.com>:

thanks Martin for reminding me about why the Required tab was needed, to
work around the "list $foo and exit" flag || map=required issue. As
earlier suggested by Glynn? we could fix that for next versions of GRASS
with a new flag->struct item which tells the parser not to worry about
testing all required options=. (and flags by definition can't be required
so as long as the flags are parsed first, it's do-able)

I have created a Trac ticket for that.

http://trac.osgeo.org/grass/ticket/156

Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

Many thanks for all the answers. I was talking about the Tcl/Tk gui.

cheers

Carlos

On Mon, May 5, 2008 at 3:36 AM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2008/5/5 Hamish <hamish_b@yahoo.com>:

> thanks Martin for reminding me about why the Required tab was needed, to
> work around the "list $foo and exit" flag || map=required issue. As
> earlier suggested by Glynn? we could fix that for next versions of GRASS
> with a new flag->struct item which tells the parser not to worry about
> testing all required options=. (and flags by definition can't be required
> so as long as the flags are parsed first, it's do-able)

I have created a Trac ticket for that.

http://trac.osgeo.org/grass/ticket/156

Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

--
+-----------------------------------------------------------+
Carlos Henrique Grohmann - Guano
Geologist M.Sc - Doctorate Student at IGc-USP - Brazil
Linux User #89721 - carlos dot grohmann at gmail dot com
+-----------------------------------------------------------+
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke

Can't stop the signal.