Ignore:
Timestamp:
Feb 19, 2006 8:10:19 PM (18 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/textresult.tcl

    r115 r193  
    3131    public method delete {args}
    3232    public method scale {args}
    33     public method download {}
     33    public method download {option}
    3434
    3535    public method select {option args}
     
    247247
    248248# ----------------------------------------------------------------------
    249 # USAGE: download
     249# USAGE: download coming
     250# USAGE: download now
    250251#
    251252# Clients use this method to create a downloadable representation
     
    254255# "string" is the data itself.
    255256# ----------------------------------------------------------------------
    256 itcl::body Rappture::TextResult::download {} {
    257     return [list .txt [$itk_component(text) get 1.0 end]]
     257itcl::body Rappture::TextResult::download {option} {
     258    switch $option {
     259        coming {
     260            # nothing to do
     261        }
     262        now {
     263            return [list .txt [$itk_component(text) get 1.0 end]]
     264        }
     265        default {
     266            error "bad option \"$option\": should be coming, now"
     267        }
     268    }
    258269}
    259270
Note: See TracChangeset for help on using the changeset viewer.