Thanks to everyone who has responded to my GmAnim problem. Here is the latest.

Suspecting that I had other issues in the src, I dumped the source, re-downloaded new source from cvs, and ran update -dP.

Then I commented out the regex and added Michael's code:

   # set initial canvas geometry to match region
    if {[catch {set region [exec g.region -ugp]} error]} {
        Gm::errmsg $error
    }

    #regexp {nsres= *([0-9]+)} $region dummy oldres1
    #regexp {ewres= *([0-9]+)} $region dummy oldres2
    #regexp {rows= *([0-9]+)} $region dummy vrows
    #regexp {cols= *([0-9]+)} $region dummy vcols

    set reglist [split $region "\n"]

    foreach line $reglist {
        set line [string trim $line]
        set key [lindex [split $line "="] 0]
        switch $key {
            nsres    {set oldres1 [lindex [split $line "="] 1]}
            ewres   {set oldres2 [lindex [split $line "="] 1]}
            rows    {set vrows [lindex [split $line "="] 1]}
            cols    {set vcols [lindex [split $line "="] 1]}
        }

    }


Presently GmAnim runs (using the same 30s raster from the worldclim database). However I do notice that several of the buttons on the animation window are broken, including the "exit" button, which gives this error:

WARNING: <tmpanimregion541> nothing removed
WARNING: <tmpanimregion541> nothing removed
    while executing
"exec g.remove region=$tmpregion --q"
    (procedure "GmAnim::cmd_exit" line 21)
    invoked from within
"GmAnim::cmd_exit"
    (command bound to event)

As an odd sidenote, the older version of GmAnim (before the animation window was updated to have buttons on the top of the window) worked fine with:

 regexp {nsres= *([0-9]+)} $region dummy oldres1
 regexp {ewres= *([0-9]+)} $region dummy oldres2
 regexp {rows= *([0-9]+)} $region dummy vrows
 regexp {cols= *([0-9]+)} $region dummy vcols




_______________________________________________
grass-dev mailing list
[email protected]
http://grass.itc.it/mailman/listinfo/grass-dev

Reply via email to