Changeset 5029 for branches/uq/lang/tcl/scripts/library.tcl
- Timestamp:
- Feb 17, 2015 5:49:36 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/uq/lang/tcl/scripts/library.tcl
r4180 r5029 215 215 public method remove {{path ""}} 216 216 public method xml {{path ""}} 217 public method uq_make_template {} 217 218 218 219 public method diff {libobj} … … 228 229 private variable _root 0 ;# non-zero => this obj owns document 229 230 private variable _document "" ;# XML DOM tree 230 private variable _node "" ;# node within 231 private variable _node "" ;# node within 231 232 } 232 233 … … 1038 1039 return $rlist 1039 1040 } 1041 1042 1043 # FIXME: get units convert. change varlist to have no units 1044 itcl::body Rappture::LibraryObj::uq_make_template {} { 1045 set varlist "" 1046 set n [$_node selectNodes /run/input//number] 1047 foreach _n $n { 1048 set x [$_n selectNodes current/text()] 1049 set val [$x nodeValue] 1050 if {[string equal -length 8 $val "uniform "] || 1051 [string equal -length 9 $val "gaussian "]} { 1052 set unode [$_n selectNodes units/text()] 1053 if {"" != $unode} { 1054 set units [$unode nodeValue] 1055 set val [Rappture::Units::mconvert $val \ 1056 -context $units -to $units -units off] 1057 } 1058 $x nodeValue @@[$_n getAttribute id] 1059 lappend varlist [list [$_n getAttribute id] $val] 1060 } 1061 } 1062 return $varlist 1063 }
Note: See TracChangeset
for help on using the changeset viewer.