Ignore:
Timestamp:
Jan 6, 2012, 11:43:45 AM (13 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/periodictable.tcl

    r2744 r2753  
    460460    set elem [FindElement $name]
    461461    if { $elem == "" || $_state($elem) == "disabled" } {
     462        if { $elem != "" } {
     463            puts stderr "element $elem is disabled"
     464        }
    462465        return ""
    463466    }
     
    607610
    608611# ----------------------------------------------------------------------
    609 # USAGE: select <name>
     612# USAGE: FindElement
    610613#
    611614# Used to manipulate the selection in the table.
     
    614617itcl::body Rappture::PeriodicTable::FindElement { what } {
    615618    foreach name [array names _table] {
     619        array unset info
    616620        array set info $_table($name)
    617621        if { $what == $info(name) || $what == $info(number) ||
    618622             $what == $info(symbol) } {
    619             break
    620         }
    621         array unset info
    622     }
    623     if { [info exists info] } {
    624         return $info(name)
    625     }
     623            return $info(name)
     624        }
     625    }
     626    parray info
    626627    return ""
    627628}
Note: See TracChangeset for help on using the changeset viewer.