[GRASS-dev] ganim troubles in latest cvs

Glynn Clements glynn at gclements.plus.com
Mon Oct 1 12:15:49 EDT 2007


Kirk Wythers wrote:

> 
> On Sep 30, 2007, at 11:23 PM, Michael Barton wrote:
> 
> > Well, after asking for help, I figured out how to this without the  
> > dread
> > regexp ;-). This might even be a bit better routine.
> >
> > Anyway, I can't commit this because I'm out of town, but if anyone  
> > wants to
> > try it, you need to change lines in procedure GmAnim::main (module
> > animate.tcl). Replace the commented lines with the uncommented  
> > lines below.
> >
> >     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]}
> >         }
> >
> >     }
> >
> > #     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
> >
> >
> 
> Michael,
> 
> Thanks for the email. I made the following changes but ended up with  
> a new error.

Add:
	set reglist [split $region "\n"]

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list