Ignore:
Timestamp:
Jun 6, 2006, 10:33:16 AM (18 years ago)
Author:
mmc
Message:

Added popup options for the "download" button. Right now this works
only for <curve> objects. You can select between CSV and PDF output.
Will add other formats later.

Fixed a few "after cancel" errors that were happening when you switch
between inputs in the structure demo.

Fixed the colors and fonts for the new bug report window.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/deviceViewer1D.tcl

    r437 r464  
    3333
    3434    public method controls {option args}
    35     public method download {option}
     35    public method download {option args}
    3636                                                                               
    3737    protected method _loadDevice {}
     
    106106
    107107    bind $itk_component(graph) <Configure> "
    108         after cancel [itcl::code $this _fixAxes]
    109         after 100 [itcl::code $this _fixAxes]
     108        [list after cancel [list catch [itcl::code $this _align]]]
     109        [list after 100 [list catch [itcl::code $this _align]]]
    110110    "
    111111
     
    170170# ----------------------------------------------------------------------
    171171# USAGE: download coming
     172# USAGE: download controls <downloadCommand>
    172173# USAGE: download now
    173174#
     
    177178# "string" is the data itself.
    178179# ----------------------------------------------------------------------
    179 itcl::body Rappture::DeviceViewer1D::download {option} {
     180itcl::body Rappture::DeviceViewer1D::download {option args} {
    180181    switch $option {
    181182        coming {
    182183            # nothing to do
    183184        }
     185        controls {
     186            # no controls for this download yet
     187            return ""
     188        }
    184189        now {
    185190            return ""  ;# not implemented yet!
    186191        }
    187192        default {
    188             error "bad option \"$option\": should be coming, now"
     193            error "bad option \"$option\": should be coming, controls, now"
    189194        }
    190195    }
     
    460465
    461466    # let the widget settle, then fix the axes to "nice" values
    462     after cancel [itcl::code $this _fixAxes]
    463     after 100 [itcl::code $this _fixAxes]
     467    after cancel [list catch [itcl::code $this _fixAxes]]
     468    after 100 [list catch [itcl::code $this _fixAxes]]
    464469}
    465470
     
    489494    set graph $itk_component(graph)
    490495    if {![winfo ismapped $graph]} {
    491         after cancel [itcl::code $this _fixAxes]
    492         after 100 [itcl::code $this _fixAxes]
     496        after cancel [list catch [itcl::code $this _fixAxes]]
     497        after 100 [list catch [itcl::code $this _fixAxes]]
    493498        return
    494499    }
Note: See TracChangeset for help on using the changeset viewer.