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

Hamish hamish_b at yahoo.com
Sun May 4 22:59:01 EDT 2008


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



More information about the grass-dev mailing list