[GRASS-dev] Re: single-click zoom doesn't preserve aspect ratio

Moritz Lennert mlennert at club.worldonline.be
Tue Nov 7 10:01:08 EST 2006

Maciej Sieczka wrote:
> Trying to switch to "Map fills display window" mode, I get an error:
> can't read "nsres": no such variable
> can't read "nsres": no such variable
>     while executing
> "expr round(abs($n-$s)/$nsres)"
>     (procedure "MapCanvas::currentzoom" line 27)
>     invoked from within
> "MapCanvas::currentzoom $mon"
>     (procedure "MapCanvas::runprograms" line 24)
>     invoked from within
> "MapCanvas::runprograms $mon [expr {$mymodified != 0}]"
>     (procedure "MapCanvas::drawmap" line 38)
>     invoked from within
> "MapCanvas::drawmap $mon"
>     (procedure "MapCanvas::display_server" line 9)
>     invoked from within
> "MapCanvas::display_server"
>     ("after" script)

I can confirm this. Changing nsres and ewres (in the next line) to 
explore_nsres and explore_ewres apparently solves the problem for me, 
but I'm not sure whether this is the correct way to do it. Michael ?

However, this raises another in my eyes more fundamental issue with 
gis.m: when such an error happens, the display canvas becomes 
unresponsive and even if I close it and open another canvas, I still 
cannot display anything. I have to close gis.m and relaunch it to be 
able to display again. This seems to be an issue with catching the 
error. Any ideas on how to solve this ?


More information about the grass-dev mailing list