Changeset 2135 for trunk/gui/scripts/tool.tcl
- Timestamp:
- Mar 14, 2011, 11:00:49 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/tool.tcl
r2079 r2135 29 29 public method abort {} 30 30 public method reset {} 31 public method xml {args} 31 32 32 33 protected method _mkdir {dir} … … 337 338 if {[$_xmlobj element -as type $path.default] ne ""} { 338 339 set defval [$_xmlobj get $path.default] 339 $_xmlobj put $path $defval 340 } 341 } 342 } 343 340 $_xmlobj put $path.current $defval 341 } 342 } 343 } 344 345 # ---------------------------------------------------------------------- 346 # USAGE: xml ?<option> <arg> <arg>...? 347 # 348 # Used to access the XML specification for this tool. With no extra 349 # args, it returns the Rappture XML object. Otherwise, it applies 350 # the option/args to the object and returns the result. The <option> 351 # might be something like "children" or "element" or any other 352 # operation supported by a Rappture::library object. 353 # ---------------------------------------------------------------------- 354 itcl::body Rappture::Tool::xml {args} { 355 if {[llength $args] == 0} { 356 return $_xmlobj 357 } 358 return [eval $_xmlobj $args] 359 } 344 360 345 361 # ----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.