[GRASS-dev] interferring ovewrite flags [was: [bug #5167] (grass) v.patch: -a(ppend) issues]

Glynn Clements glynn at gclements.plus.com
Mon Sep 25 13:55:13 EDT 2006


Markus Neteler wrote:

> > Is having both -o and --o a problem?
> > 
> > The reason I ask is that --o, by design, doesn't show up in the
> > module/script GUI.
> 
> This is a problem which should be fixed in parser.c for
> both XML and tcltk. I was already asked by several users
> why --overwrite doesn't show up but forgot to report it
> here.
> 
> > For r.mask, much of the time, the user will simply want
> > to overwrite the existing MASK file, to avoid the annoyance of having to run
> > g.remove each time (note the MASK file created by r.mask is a reclass of a
> > real raster file, so there is little loss if it is deleted).
> > 
> > So in this case, I'd prefer to have an overwrite option easily accessible to
> > a user. How best to do this?
> 
> The --overwrite stuff already implemented for HTML/generic needs to
> be added into the XML and TclTk sections in
> lib/gis/parser.c

It shouldn't be added to the Tcl/Tk section; as the switch is always
available in every module, it should be left to the UI to add it.

Note that it can't simply be added as if it were a normal flag due to
the double dash. Apart from that, it shouldn't be added as if it were
a normal flag due to the fact that it doesn't behave like other flags,
e.g. it cannot be composed.

There doesn't seem to be much point in adding another item type
(alongside flag and option) for the hardcoded flags.

Similar arguments apply to the XML output.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list