Ignore:
Timestamp:
Feb 19, 2006, 8:10:19 PM (19 years ago)
Author:
mmc
Message:
  • Added "Upload..." capability to the <loader> widget. You can now add an <upload> directive containing the path of the control that will receive data. A file is uploaded from the desktop and saved in the specified control.
  • Fixed download capability to work properly for all result types, including contour plots and molecules.
  • Added rappture::signal so we can catch SIGHUP and clean up the upload/download spool directory.
File:
1 edited

Legend:

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

    r115 r193  
    2828    public method delete {args}
    2929    public method scale {args}
    30     public method download {}
     30    public method download {option}
    3131
    3232    set _dataobj ""  ;# data object currently being displayed
     
    147147
    148148# ----------------------------------------------------------------------
    149 # USAGE: download
     149# USAGE: download coming
     150# USAGE: download now
    150151#
    151152# Clients use this method to create a downloadable representation
     
    154155# "string" is the data itself.
    155156# ----------------------------------------------------------------------
    156 itcl::body Rappture::ValueResult::download {} {
    157     return ""
     157itcl::body Rappture::ValueResult::download {option} {
     158    switch $option {
     159        coming {
     160            # nothing to do
     161        }
     162        now {
     163            set lstr [$itk_component(label) cget -text]
     164            set vstr [$itk_component(value) cget -text]
     165            return [list .txt "$lstr: $vstr"]
     166        }
     167        default {
     168            error "bad option \"$option\": should be coming, now"
     169        }
     170    }
    158171}
Note: See TracChangeset for help on using the changeset viewer.