Changeset 2753 for trunk/gui/scripts/periodictable.tcl
- Timestamp:
- Jan 6, 2012, 11:43:45 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/periodictable.tcl
r2744 r2753 460 460 set elem [FindElement $name] 461 461 if { $elem == "" || $_state($elem) == "disabled" } { 462 if { $elem != "" } { 463 puts stderr "element $elem is disabled" 464 } 462 465 return "" 463 466 } … … 607 610 608 611 # ---------------------------------------------------------------------- 609 # USAGE: select <name>612 # USAGE: FindElement 610 613 # 611 614 # Used to manipulate the selection in the table. … … 614 617 itcl::body Rappture::PeriodicTable::FindElement { what } { 615 618 foreach name [array names _table] { 619 array unset info 616 620 array set info $_table($name) 617 621 if { $what == $info(name) || $what == $info(number) || 618 622 $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 626 627 return "" 627 628 }
Note: See TracChangeset
for help on using the changeset viewer.