Changeset 75


Ignore:
Timestamp:
Dec 4, 2009 4:59:59 PM (11 years ago)
Author:
toby
Message:

# on 1999/04/05 18:14:24, toby did:
fix BLT element -show/-hide option
add timing debug option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/liveplot

    • Property rcs:date changed from 1999/03/19 17:07:59 to 1999/04/05 18:14:24
    • Property rcs:lines changed from +178 -23 to +22 -7
    • Property rcs:rev changed from 1.5 to 1.6
    r73 r75  
    5757if [catch {set blt_version}] {set blt_version 0}
    5858# option for coloring markers: note that GH keeps changing how to do this!
     59# also element -mapped => -show
    5960if {$blt_version < 2.3 || $blt_version >= 8.0} {
     61    # version 8.0 is ~same as 2.3
    6062    set graph(MarkerColorOpt) -fg
     63    # mapped is needed in 8.0, both are OK in 2.3
     64    set graph(ElementShowOption) "-mapped 1"
     65    set graph(ElementHideOption) "-mapped 0"
    6166} elseif {$blt_version >= 2.4} {
    6267    set graph(MarkerColorOpt) -outline
     68    set graph(ElementShowOption) "-hide 0"
     69    set graph(ElementHideOption) "-hide 1"
    6370} else {
    6471    set graph(MarkerColorOpt) -color
     72    set graph(ElementShowOption) "-mapped 1"
     73    set graph(ElementHideOption) "-mapped 0"
    6574}
    6675
     
    135144    global expgui
    136145    if [catch {
    137         #puts [time {
     146        set loadtime [time {
    138147            if {$expgui(tcldump) == ""} {
    139148                readdata_hst $box
     
    141150                readdata_tcl $box
    142151            }
    143         #}]
     152        }]
     153        if $expgui(debug) {
     154            tk_dialog .time "Timing info" \
     155                    "Histogram loading took $loadtime" "" 0 OK
     156        }
    144157    } errmsg] {
    145         if $expgui(debug) {error $errmsg}
     158        if $expgui(debug) {
     159            catch {console show}
     160            error $errmsg
     161        }
    146162        $box config -title "Read error: $errmsg"
    147         catch {console show}
    148163        puts "error message: $errmsg"
    149164        update
     
    272287        $box config -title "(Error reading Histogram $hst)"
    273288        foreach elem [$box element show] {
    274            $box element config $elem -hide 1
     289           eval $box element config $elem $graph(ElementHideOption)
    275290        }
    276291        return
    277292    }
    278293    foreach elem [$box element names] {
    279         $box element config $elem -hide 0
     294        eval $box element config $elem $graph(ElementShowOption)
    280295    }
    281296    xvec set $X
Note: See TracChangeset for help on using the changeset viewer.