Changeset 2753
- Timestamp:
- Jan 6, 2012, 11:43:45 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/app-fermi/octave/octave3/tool.xml
r1633 r2753 3 3 <tool> 4 4 <about>Press Simulate to view results.</about> 5 <command>octave --silent --eval infile='@driver',path('@tool',path),fermi</command>5 <command>octave --silent --eval "infile='@driver',path('@tool',path),fermi"</command> 6 6 </tool> 7 7 <input> -
trunk/gui/scripts/controlOwner.tcl
r1929 r2753 66 66 note contents 67 67 number current 68 periodicelement current 68 69 string current 69 70 } -
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 } -
trunk/gui/scripts/tool.tcl
r2744 r2753 184 184 regsub -all {\\} $cmd {\\\\} cmd 185 185 set cmd [string trimleft $cmd " "] 186 186 if { $cmd == "" } { 187 puts stderr "cmd is empty" 188 return [list 1 "Command is empty.\n\nThere is no command specified by\n\n <command>\n </command>\n\nin the tool.xml file."] 189 } 187 190 # if job_protocol is "submit", then use use submit command 188 191 if {[resources -jobprotocol] == "submit"} { … … 197 200 set job(output) [string range $cmd 5 end] 198 201 } else { 199 set status [catch {eval blt::bgexec \ 200 ::Rappture::Tool::job(control) \ 201 -keepnewline yes \ 202 -killsignal SIGTERM \ 203 -onoutput [list [itcl::code $this _output]] \ 204 -output ::Rappture::Tool::job(output) \ 205 -error ::Rappture::Tool::job(error) $cmd} result] 202 set status [catch { 203 eval blt::bgexec \ 204 ::Rappture::Tool::job(control) \ 205 -keepnewline yes \ 206 -killsignal SIGTERM \ 207 -onoutput [list [itcl::code $this _output]] \ 208 -output ::Rappture::Tool::job(output) \ 209 -error ::Rappture::Tool::job(error) \ 210 $cmd 211 } result] 206 212 207 213 if { $status != 0 } { 208 foreach {code pid mesg} $::Rappture::Tool::job(control) break 209 if { $code != "EXITED" } { 210 set result "Abnormal program termination \"$code\": $mesg" 211 return [list $status $result] 212 } 214 if { $::Rappture::Tool::job(control) != "" } { 215 set code [lindex $::Rappture::Tool::job(control) 0] 216 set mesg [lindex $::Rappture::Tool::job(control) 2] 217 if { $code != "EXITED" } { 218 set result \ 219 "Abnormal program termination \"$code\": $mesg" 220 } 221 } 222 return [list $status $result] 213 223 } 214 224 }
Note: See TracChangeset
for help on using the changeset viewer.