[GRASS-dev] i.rectify should test for illegal file names
before launching rectification
Moritz Lennert
mlennert at club.worldonline.be
Mon Nov 5 16:52:41 EST 2007
On Mon, November 5, 2007 22:24, Glynn Clements wrote:
>
> Moritz Lennert wrote:
>
>> >> If you give an illegal output name to i.rectify, this is only tested
>> >> after rectification. This should be done before in order to have to
>> wait
>> >> for the whole process to finish to then notice it won't work.
>> >>
>> > Right - I guess
>> > G_legal_filename()
>> > at the beginning would do the job.
>>
>> Yes, just make sure to check the given output filename + the given
>> extension.
>
> Oh; you're talking about illegal *file* names (as opposed to map
> names)?
No sorry, I meant map names.
>
>> BTW anyone know how to give an empty extension in the tcltk gui ? On the
>> command line I can use extension="", but in the gui I get an error
>> because of an illegal ".
>
> On the command line, using:
>
> extension=""
>
> is the same as using just:
>
> extension=
>
> The quotes are removed by the shell.
Thanks for the info.
>
> More generally, Tcl requires any quotes to go around the entire
> "word", so a command line argument such as:
>
> text="hello world"
>
> would need to be entered as
>
> "text=hello world"
> or:
> {text=hello world}
>
So what would be the tcltk gui equivalent of extension= or extension=""
? "Extension" is a text field to be filled in. So as a result you get a
command line with extension=anything you put in the field (without any
quotes. However, leaving the field empty does not work, as it is a
required field. '""' doesn't work either. Would it work if the gui used
curly braces around the result ? I.e. how to indicate an empty string to
the gui ?
Moritz
More information about the grass-dev
mailing list