Changeset 2164
- Timestamp:
- Mar 28, 2011, 9:34:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/tool.tcl
r2141 r2164 24 24 } { # defined below } 25 25 26 destructor { # defined below } 27 26 28 public method installdir {} { return $_installdir } 27 29 … … 33 35 protected method _output {data} 34 36 37 private variable _origxml "" ;# copy of original XML (for reset) 35 38 private variable _installdir "" ;# installation directory for this tool 36 39 private variable _outputcb "" ;# callback for tool output … … 61 64 results_directory Rappture::Tool::setResultDir 62 65 } 63 66 64 67 # ---------------------------------------------------------------------- 65 68 # CONSTRUCTOR … … 71 74 set _xmlobj $xmlobj 72 75 76 # stash a copy of the original XML for later "reset" operations 77 set _origxml [Rappture::LibraryObj ::#auto "<?xml version=\"1.0\"?><run/>"] 78 $_origxml copy "" from $_xmlobj "" 79 73 80 if {![file exists $installdir]} { 74 81 error "directory \"$installdir\" doesn't exist" … … 77 84 78 85 eval configure $args 86 } 87 88 # ---------------------------------------------------------------------- 89 # DESTRUCTOR 90 # ---------------------------------------------------------------------- 91 itcl::body Rappture::Tool::destructor {} { 92 itcl::delete object $_origxml 79 93 } 80 94 … … 334 348 # ---------------------------------------------------------------------- 335 349 itcl::body Rappture::Tool::reset {} { 350 $_xmlobj copy "" from $_origxml "" 336 351 foreach path [Rappture::entities -as path $_xmlobj input] { 337 352 if {[$_xmlobj element -as type $path.default] ne ""} {
Note: See TracChangeset
for help on using the changeset viewer.