Changeset 6 for trunk/gui/apps
- Timestamp:
- Mar 23, 2005, 8:19:29 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/apps/driver
r1 r6 82 82 83 83 # open the XML file containing the material library 84 set lib [Rappture:: Library::open-std library.xml]84 set lib [Rappture::library -std library.xml] 85 85 86 86 # open the XML file containing the tool parameters … … 89 89 exit 1 90 90 } 91 set tool [Rappture:: Library::open$toolfile]91 set tool [Rappture::library $toolfile] 92 92 93 93 # open the XML file containing the configuration for this application … … 96 96 exit 1 97 97 } 98 set config [Rappture:: Library::open$configfile]98 set config [Rappture::library $configfile] 99 99 100 100 # ---------------------------------------------------------------------- … … 148 148 # ---------------------------------------------------------------------- 149 149 set w $win.input 150 set ndevs [$config get -count controls.device] 151 if {$ndevs > 0} { 152 for {set i 0} {$i < $ndevs} {incr i} { 153 set obj [$config get -object controls.device$i] 150 set dfirst "" 151 set dlist [$config children -type structure controls] 152 if {"" != $dlist} { 153 foreach dname $dlist { 154 set obj [$config element -flavor object controls.$dname] 154 155 set name [$obj get label] 155 156 set devs($name) $obj … … 157 158 set devlist [lsort [array names devs]] 158 159 159 if { $ndevs> 1} {160 if {[array size devs] > 1} { 160 161 frame $w.devsel 161 162 pack $w.devsel -side top -fill x … … 173 174 174 175 set first [lindex $devlist 0] 176 set dfirst $devs($first) 175 177 Rappture::DeviceViewer1D $w.device -device $devs($first) \ 176 178 -tool $tool -library $lib … … 185 187 set w $win.output 186 188 Rappture::Analyzer $w.analyze -holdwindow $win.input \ 187 -tool $tool -analysis [$config get -object analysis] \188 -device $d evs($first)189 -tool $tool -analysis [$config element -flavor object analysis] \ 190 -device $dfirst 189 191 pack $w.analyze -expand yes -fill both 190 192 … … 192 194 # HOOK UP ANY CONTROLS CALLED OUT IN CONFIG.XML 193 195 # ---------------------------------------------------------------------- 194 set ncntls [$config get -count controls.access] 195 for {set i 0} {$i < $ncntls} {incr i} { 196 set name [$config get access$i] 196 foreach access [$config children -type access controls] { 197 set name [$config get controls.$access] 197 198 switch -glob -- $name { 198 parameters.ambient* - device* {199 parameters.ambient* - structure* { 199 200 $win.input.device controls add $name 200 201 }
Note: See TracChangeset
for help on using the changeset viewer.