Tk Library Source Code

View Ticket
Login
Ticket UUID: 1765052
Title: nmea library; undefined variable error in ::nmea::read_port
Type: Bug Version: None
Submitter: paul_moir Created on: 2007-08-01 02:15:18
Subsystem: None Assigned To: nobody
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2007-08-17 00:33:18
Resolution: Duplicate Closed By: afaupell
    Closed on: 2007-08-16 17:33:18
Description:
In the library modules/nmea/nmea.tcl the procedure read_port is as follows:

proc ::nmea::read_port {f} {
    set line [gets $f]
    if {$::nmea::nmea(log) != ""} {
        puts $nmea(log) $line
    }
    ::nmea::parse_nmea $line
}

When logging is turned on this fails with an "unknown variable $nmea(log)" since nmea is undefined. I believe it should read:

proc ::nmea::read_port {f} {
    variable nmea
    set line [gets $f]
    if {$::nmea::nmea(log) != ""} {
        puts $nmea(log) $line
    }
    ::nmea::parse_nmea $line
}

I hope this is correct. Thank you for your time!