Changeset 682 for trunk/gui/scripts


Ignore:
Timestamp:
Apr 24, 2007, 8:08:51 PM (17 years ago)
Author:
mmc
Message:

Fixed the Rappture::filexfer::upload operation to display an error
message when the user forgets to choose a file and nothing gets uploaded.

File:
1 edited

Legend:

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

    r681 r682  
    121121
    122122        if {$status == 0} {
     123            set changed ""
    123124            set errs ""
    124125            foreach file $job(output) {
     
    135136                    append errs "Error loading data for \"$file2label($file)\":\n$result\n"
    136137                } else {
     138                    lappend changed $file2path($file)
    137139                    uplevel #0 [list $callback path $file2path($file) data $info]
    138140                }
     141            }
     142            if {[llength $changed] == 0} {
     143                set errs "The form was empty, so none of your controls were changed.  In order to upload a file, you must select the file name--or enter text into the copy/paste area--before pushing the Upload button."
    139144            }
    140145            if {[string length $errs] > 0} {
Note: See TracChangeset for help on using the changeset viewer.