Changeset 87
- Timestamp:
- Oct 5, 2005 7:28:40 PM (18 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/exec.tcl
r64 r87 27 27 variable execout 28 28 29 set execout "" 29 set execout(output) "" 30 set execout(channel) "" 31 set execout(extra) "" 32 30 33 eval blt::bgexec control \ 31 34 -keepnewline yes \ … … 34 37 $args 35 38 36 return $execout 39 # add any extra stuff pending from the last stdout/stderr change 40 append execout(output) $execout(extra) 41 42 return $execout(output) 37 43 } 38 44 … … 54 60 if {$channel == "stderr"} { 55 61 set newmesg "" 56 if {[string length $execout] > 057 && [string index $execout end] != "\n"} {58 set newmesg "\n"59 }60 62 foreach line [split $message \n] { 61 63 append newmesg "=RAPPTURE-ERROR=>$line\n" 62 64 } 63 set message [string trimright $newmesg \n]65 set message $newmesg 64 66 } 65 67 66 puts -nonewline $message 67 append execout $message 68 # 69 # If this message is coming in on the same channel as the 70 # last, then fine, add it on. But if it's coming in on a 71 # different channel, we must make sure that we're at a good 72 # breakpoint. If there's not a line break at the end of the 73 # current output, then add the extra stuff onto a buffer 74 # that we will merge in later once we get to a good point. 75 # 76 if {$execout(channel) == ""} { 77 set execout(channel) $channel 78 } 79 80 set ready [expr {[string length $execout(output)] == 0 81 || [string index $execout(output) end] == "\n"}] 82 83 if {$channel != $execout(channel)} { 84 if {$ready} { 85 # changing channels... 86 if {[string length $execout(extra)] > 0} { 87 # any extra stuff on this new channel? put it out now 88 puts -nonewline $execout(extra) 89 append execout(output) $execout(extra) 90 set execout(extra) "" 91 } 92 puts -nonewline $message 93 append execout(output) $message 94 set execout(channel) $channel 95 } else { 96 # not ready to change channels -- keep this for later 97 append execout(extra) $message 98 } 99 } else { 100 # no need to change channels -- keep printing 101 puts -nonewline $message 102 append execout(output) $message 103 } 68 104 } -
trunk/gui/scripts/field.tcl
r64 r87 55 55 set _units [$_field get units] 56 56 57 set xunits [$xmlobj get units] 58 if {"" == $xunits || "arbitrary" == $xunits} { 59 set xunits "um" 60 } 61 57 62 # determine the overall size of the device 58 63 set z0 [set z1 0] … … 65 70 set z0 [$_xmlobj get components.$elem.corner0] 66 71 set z0 [Rappture::Units::convert $z0 \ 67 -context um -to um-units off]72 -context $xunits -to $xunits -units off] 68 73 69 74 set z1 [$_xmlobj get components.$elem.corner1] 70 75 set z1 [Rappture::Units::convert $z1 \ 71 -context um -to um-units off]76 -context $xunits -to $xunits -units off] 72 77 73 78 set _limits($elem) [list $z0 $z1] -
trunk/gui/scripts/mainwin.tcl
r45 r87 183 183 set s [blt::cutbuffer get] 184 184 if {"" != $s && ![string equal $s $_sync(cutbuffer)]} { 185 # 186 # Convert any \r's in the cutbuffer to \n's. 187 # 188 if {[string first "\r" $s] >= 0} { 189 regsub -all "\r\n" $s "\n" s 190 regsub -all "\r" $s "\n" s 191 blt::cutbuffer set $s 192 } 193 185 194 set _sync(cutbuffer) $s 186 195
Note: See TracChangeset
for help on using the changeset viewer.