[GRASS-dev] i.rectify should test for illegal file names before launching rectification

Moritz Lennert mlennert at club.worldonline.be
Tue Nov 6 06:42:35 EST 2007


On 06/11/07 03:25, Michael Barton wrote:
> 
> 
> On 11/5/07 9:10 AM, "Moritz Lennert" <mlennert at club.worldonline.be>
> wrote:
> 
>> 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 ".
> 
> Moritz,
> 
> I'd offer some advice, but I'm not sure I understand what you mean.

How do you reproduce the following command:

i.rectify [...] extension=

in the gui launched when running i.rectify from the menu or from the
command line without options ?

Glynn has already pointed out that this seems to be a general deficiency:

On 06/11/07 11:08, Glynn Clements wrote:
> 
> This appears to be a deficiency with the way that the GUI decides 
> whether to pass an option.
> 
> G_parser() can distinguish between an absent option and an option
> with the empty string as its value.
> 
> If the GUI treats an empty text field as the option not being given, 
> then there is no way to pass an empty string as an option value. 
> Anything you put into the text field will be passed literally as the 
> option's value.
> 
> AFAICT, the only solution is to add a checkbox to each option to
> force the option to be passed. I suspect that i.rectify won't be the
> only module where you might want to pass the empty string as an
> option value.
> 
> Note that we have a similar problem with scripts using g.parser. I.e.
>  there's no way to distinguish between an absent option and the empty
>  string as the option's value.

Moritz




More information about the grass-dev mailing list