[GRASS-dev] gis.m: last line duplicated in the Output panel
Michael Barton
michael.barton at asu.edu
Tue May 15 00:57:15 EDT 2007
Will it work if you just take out the last line display clause? (beginning
with set last [lindex...).
Michael
On 5/14/07 7:29 PM, "Huidae Cho" <grass4u at gmail.com> wrote:
> When running "any" commands from gis.m, I get duplicated last lines in
> the Output window. In lib/gtcltk/gronsole.tcl,
>
> proc Gronsole::readout {path ci mark fh} {
>
> set lines {}
>
> while {[gets $fh line] >= 0} {
> lappend lines $line
> }
>
> if {[llength $lines] != 0} {
> Gronsole::add_data_tag $path $ci out
> }
> foreach line $lines {
> Gronsole::output_to_gronsole $path $mark $ci [list cmd$ci
> cmd$ci-out] "$line\n"
> }
> set last [lindex $lines end]
> if {$last != {}} {
> Gronsole::output_to_gronsole $path $mark $ci [list cmd$ci
> cmd$ci-out] $last
> }
>
> The above if clause unnecessarily outputs the last line *again* after all the
> output is sent to gronsole. Do we need to omit the newline from the last
> line?
>
>
> Huidae Cho
>
>
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
More information about the grass-dev
mailing list