[GRASS-dev] [bug #4604] (grass) tcl/tk GUI: v.digit can't create
new vector in GUI mode
Glynn Clements
glynn at gclements.plus.com
Mon Jul 24 12:54:19 EDT 2006
Maciek Sieczka via RT wrote:
> > So this is NOT a bug. It is the way that the GRASS CLI is supposed to work.
> > You can make it a wish, however.
>
> Michael,
>
> You are right that it is not a bug, that v.digit from CLI doesn't spawn a
> monitor automatically. It shouldn't do that and this is clear.
>
> However, there *is* a bug v.digit in tcl/tk GUI mode that prevents it from
> creating a new vector. Try to reproduce it, like this:
>
> $ d.mon x0
> $ v.digit&
>
> Now type in the new vector name and check the "Create new file..." button (so
> that the whole command is eg. "v.digit map=new_vector -n"), press Run
>
> The output is:
>
> GRASS_INFO_MESSAGE(17052,1): New empty map created.
> Application initialization failed: "-n" option requires an additional argument
> Error in startup script: couldn't read file "map=new_vector": no such file or
> directory
Those error messages come from Tk; it's because v.digit is passing its
command-line options to Tk, which is trying to interpret them.
Note:
$ wish map=new_vector -n
Application initialization failed: "-n" option requires an additional argument
Error in startup script: couldn't read file "map=new_vector": no such file or directory
v.digit needs to pass a "fake" command-line to Tk_Main().
> As Markus said, this works from CLI fine so this might be a GUI specific
> issue. Can you look into this?
That exact case shouldn't work from the command line either. However,
putting the -n first will eliminate the error message, as it will have
the argument which it requires (Tk treats -n as a shorthand for
-name).
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list