Ignore:
Timestamp:
Feb 23, 2006, 9:06:49 AM (19 years ago)
Author:
mmc
Message:
  • Fixed up the tool tips for upload to remind the user about allowing pop ups, and to catch errors when the user uploads nothing.
  • Added a protocol version number to the filexfer applet, so Rappture can warn when the applet is out-of-date with respect to the application. (Thanks, Rick!)
File:
1 edited

Legend:

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

    r210 r213  
    286286            if {$status == 0} {
    287287                Rappture::Tooltip::cue $itk_component(combo) \
    288                     "Upload starting...\nA web browser page should pop up on your desktop.  Use that form to handle the upload operation."
     288                    "Upload starting...\nA web browser page should pop up on your desktop.  Use that form to handle the upload operation.\n\nIf the upload form doesn't pop up, make sure that you're allowing pop ups from this site.  If it still doesn't pop up, you may be having trouble with the version of Java installed for your browser.  See our Support area for details.\n\nClick anywhere to dismiss this message."
    289289            } else {
    290290                if {$result == "no clients"} {
    291291                    Rappture::Tooltip::cue $itk_component(combo) \
    292292                        "Can't upload files.  Looks like you might be having trouble with the version of Java installed for your browser."
     293                } elseif {"old client" == $result} {
     294                    Rappture::Tooltip::cue $itk_component(combo) "For this to work properly, you must first restart your Web browser.  You don't need to close down this session.  Simply shut down all windows for your Web browser, then restart the browser and navigate back to this page.  You'll find it on \"my nanoHUB\" listed under \"my sessions\".  Once the browser is restarted, the upload should work properly."
     295                } elseif {"old clients" == $result} {
     296                    Rappture::Tooltip::cue $itk_component(combo) "There are multiple browser pages connected to this session, and one of them has browser that needs to be restarted.\n\nWhoever didn't get the upload form should restart their Web browser.  You don't need to close down this session.  Simply shut down all windows for the Web browser, then restart the browser and navigate back to this page.  You'll find it on \"my nanoHUB\" listed under \"my sessions\".  Once the browser is restarted, the upload should work properly."
    293297                } else {
    294298                    bgerror $result
     
    314318                    Rappture::Tooltip::cue $itk_component(combo) \
    315319                        "Can't download data.  Looks like you might be having trouble with the version of Java installed for your browser."
     320                } elseif {"old client" == $result} {
     321                    Rappture::Tooltip::cue $itk_component(combo) "For this to work properly, you must first restart your Web browser.  You don't need to close down this session.  Simply shut down all windows for your Web browser, then restart the browser and navigate back to this page.  You'll find it on \"my nanoHUB\" listed under \"my sessions\".  Once the browser is restarted, the download should work properly."
     322                } elseif {"old clients" == $result} {
     323                    Rappture::Tooltip::cue $itk_component(combo) "There are multiple browser pages connected to this session, and one of them has browser that needs to be restarted.\n\nWhoever didn't get the download should restart their Web browser.  You don't need to close down this session.  Simply shut down all windows for the Web browser, then restart the browser and navigate back to this page.  You'll find it on \"my nanoHUB\" listed under \"my sessions\".  Once the browser is restarted, the download should work properly."
    316324                } else {
    317325                    bgerror $result
     
    380388
    381389# ----------------------------------------------------------------------
    382 # USAGE: _uploadValue
     390# USAGE: _uploadValue ?<key> <value> <key> <value> ...?
    383391#
    384392# Invoked automatically whenever the user has uploaded data from
     
    386394# argument) and loads into the destination widget.
    387395# ----------------------------------------------------------------------
    388 itcl::body Rappture::Loader::_uploadValue {string} {
     396itcl::body Rappture::Loader::_uploadValue {args} {
    389397    Rappture::Tooltip::cue hide  ;# take down the note about the popup window
     398
     399    array set data $args
     400
     401    if {[string length [string trim $data(data)]] == 0} {
     402        switch -- $data(which) {
     403            file {
     404                set mesg "You indicated that you were uploading a file, but y"
     405            }
     406            text {
     407                set mesg "You indicated that you were uploading text, but y"
     408            }
     409            default {
     410                set mesg "Y"
     411            }
     412        }
     413        Rappture::Tooltip::cue $itk_component(combo) \
     414            "${mesg}ou didn't fill in any data on the upload form."
     415        return
     416    }
     417
    390418    #
    391419    # BE CAREFUL:  This string may have binary characters that
     
    394422    #   done with it.
    395423    #
     424    set string $data(data)
    396425    regsub -all {[\000-\010\013\014\016-\037\177-\377]} $string {} string
    397426    regsub -all "\r" $string "\n" string
Note: See TracChangeset for help on using the changeset viewer.