[GRASS-dev] [bug #5483] (grass) g.mremove through gis manager GUI seems not to work well

Glynn Clements glynn at gclements.plus.com
Thu Feb 8 06:33:47 EST 2007


Hamish wrote:

> > > up to now interactive input in tcl based dialogs is not possible.
> > > Using the -f flag (force removal) you can delete also in gis.m.
> > > 
> > > Probably we need to enforce -f somehow in gis.m - how to do that?
> 
> > I've committed a fix which removes the prompting code. The -f flag
> > remains for compatibility but is ignored.
> 
> I understand the push to remove interactive, but this one is a fairly
> important failsafe and I wouldn't mind it staying. With the -f flag a
> non-interactive mode is available. An -i or --interactive flag as rm
> uses could be added, but who would bother setting up an alias to use it?
> Problably not the new users who would benefit from it the most.

A -i flag would be all well and good, *if* you could guarantee that
there was a terminal from which to obtain the user's response.

Fixing bugs (e.g. assuming the presence of a terminal) takes
precedence over implementing wishes (e.g. a -i flag).

There's also the issue that currently there's no way to tell the GUI
that it needs to either hide the -i flag from the user, or use an
xterm if the -i flag is enabled.

Ultimately, a module is either interactive or it isn't. If it's even
slightly interactive, then it's interactive, and that reduces its
usability.

> To answer Markus's question, you can preset/hint an option's answer in
> the GUI by giving it on the command line and adding the --ui switch to
> force a GUI:
> 
> g.mremove -f --ui
> 
> I've backported a fix using this method to the 6.2 GUI menu.tcl:
>  -command {execute "g.mremove -f --ui" }}

What happens if the user deselects the -f switch from the GUI? Is
there any way to kill the hung process?

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




More information about the grass-dev mailing list