Changeset 13 for trunk/gui/scripts/resultset.tcl
- Timestamp:
- Jun 8, 2005 5:37:19 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/resultset.tcl
r11 r13 14 14 option add *ResultSet.width 4i widgetDefault 15 15 option add *ResultSet.height 4i widgetDefault 16 option add *ResultSet.colors {blue #000066} widgetDefault16 option add *ResultSet.colors {blue magenta} widgetDefault 17 17 option add *ResultSet.toggleBackground gray widgetDefault 18 18 option add *ResultSet.toggleForeground white widgetDefault … … 130 130 # Adds a new result to this result set. Scans through all existing 131 131 # results to look for a difference compared to previous results. 132 # Returns an instruction to the caller, indicating how the various132 # Returns the index of this new result to the caller. The various 133 133 # data objects for this result set should be added to their result 134 # viewers .134 # viewers at the same index. 135 135 # ---------------------------------------------------------------------- 136 136 itcl::body Rappture::ResultSet::add {xmlobj} { … … 149 149 $itk_component(status) configure -text "1 result" 150 150 $itk_component(clear) configure -state normal 151 return "add"151 return 0 152 152 } 153 153 … … 173 173 174 174 # build a tuple for this new object 175 set op "add"176 175 set cols "" 177 176 set tuple "" … … 198 197 199 198 # overwrite the first matching entry 200 set i [lindex $ilist 0]201 $_results put $i $tuple199 set index [lindex $ilist 0] 200 $_results put $index $tuple 202 201 set _recent $xmlobj 203 set op "replace $i"204 205 202 } else { 203 set index [$_results size] 206 204 $_results insert end $tuple 207 205 set _recent $xmlobj … … 215 213 $itk_component(clear) configure -state normal 216 214 217 return $ op215 return $index 218 216 } 219 217 … … 232 230 } 233 231 catch {unset _col2widget} 232 set _plotall "" 234 233 set _counter 0 235 234
Note: See TracChangeset
for help on using the changeset viewer.