Changeset 1985 for branches/blt4
- Timestamp:
- Dec 8, 2010 2:47:15 PM (14 years ago)
- Location:
- branches/blt4/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/gui/scripts/datatableresult.tcl
r1941 r1985 244 244 set dlist [linsert $dlist 0 $dataobj] 245 245 } 246 247 246 # generate the comma-separated value data for these objects 247 248 # This is at least better than what was there. 249 # For each datatable object convert the values 250 # in the tree by loading it into a blt::datatable 251 # and then exporting the comma separated values 248 252 set csvdata "" 249 253 foreach dataobj $dlist { 254 set tree [$dataobj values] 255 set d0 [blt::datatable create] 256 package require blt_datatable_tree 257 $d0 import tree $tree 0 250 258 append csvdata "[string repeat - 60]\n" 251 259 append csvdata " [$dataobj hints label]\n" … … 259 267 } 260 268 append csvdata "[string repeat - 60]\n" 261 262 append csvdata "[$dataobj hints xlabel], [$dataobj hints ylabel]\n" 263 set first 1 264 foreach comp [$dataobj components] { 265 if {!$first} { 266 # blank line between components 267 append csvdata "\n" 268 } 269 set xv [$dataobj mesh $comp] 270 set yv [$dataobj values $comp] 271 foreach x [$xv values] y [$yv values] { 272 append csvdata [format "%20.15g, %20.15g\n" $x $y] 273 } 274 set first 0 275 } 269 append csvdata [$d0 export csv -columnlabels] 276 270 append csvdata "\n" 271 blt::datatable destroy $d0 277 272 } 278 273 return [list .txt $csvdata] -
branches/blt4/gui/scripts/heightmapviewer.tcl
r1923 r1985 103 103 private variable _resizePending 0 104 104 private variable _resizeLegendPending 0 105 private variable _frame 0; # Current frame number. 105 106 } 106 107 … … 508 509 # ---------------------------------------------------------------------- 509 510 itcl::body Rappture::HeightmapViewer::Connect {} { 511 global readyForNextFrame 512 set readyForNextFrame 1 510 513 Disconnect 511 514 set _hosts [GetServerList "nanovis"] … … 529 532 set _outbuf "" 530 533 # disconnected -- no more data sitting on server 534 global readyForNextFrame 535 set readyForNextFrame 1 531 536 } 532 537 … … 557 562 # ---------------------------------------------------------------------- 558 563 itcl::body Rappture::HeightmapViewer::ReceiveImage { args } { 564 global readyForNextFrame 565 set readyForNextFrame 1 559 566 if {![IsConnected]} { 560 567 return … … 565 572 array set info $args 566 573 set bytes [ReceiveBytes $info(-bytes)] 567 ReceiveEcho <<line "<read $info(-bytes) bytes" 574 ReceiveEcho <<line "<read $info(-bytes) bytes args=$args" 575 puts stderr "<read $info(-bytes) bytes" 568 576 if { $info(-type) == "image" } { 569 577 $_image(plot) configure -data $bytes 570 578 ReceiveEcho <<line "<read for [image width $_image(plot)]x[image height $_image(plot)] image>" 579 puts stderr "<read for [image width $_image(plot)]x[image height $_image(plot)] image>" 571 580 } elseif { $info(type) == "print" } { 572 581 set tag $this-print-$info(-token) … … 727 736 SendBytes $_outbuf; 728 737 blt::busy release $itk_component(hull) 738 739 # The "readyForNextFrame" variable throttles the sequence play rate. 740 global readyForNextFrame 741 set readyForNextFrame 0; # Don't advance to the next frame 742 # until we get an image. 729 743 set _buffering 0; # Turn off buffering. 730 744 set _outbuf ""; # Clear the buffer.
Note: See TracChangeset
for help on using the changeset viewer.