Ignore:
Timestamp:
May 10, 2007, 7:53:32 PM (17 years ago)
Author:
mmc
Message:

Fixed the bugreport component to automatically register all "Oops!"
errors with the ticketing system on the hosting hub. When the
RAPPTURE_VERSION environment variable is set to "current", the
dialog automatically registers errors. Otherwise, it pops up a
dialog showing the error to the developer. It also registers errors
that come from launching jobs ("Problem launching job" messages).

Fixed the Makefile to install all scripts/*.tcl files, so we don't
have to modify configure each time a file is added.

File:
1 edited

Legend:

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

    r680 r724  
    2424    } { # defined below }
    2525
    26     public method get {{option ""}}
    2726    public method installdir {} { return $_installdir }
    2827
     
    3736    private common jobnum 0          ;# counter for unique job number
    3837
    39     # resources file tells us the application name
    40     public common _appname ""
    41     public proc setAppName {name} { set _appname $name }
     38    # get global resources for this tool session
     39    public proc resources {{option ""}}
     40
     41    public common _resources
     42    public proc setAppName {name} { set _resources(-appname) $name }
     43    public proc setHubName {name} { set _resources(-hubname) $name }
     44    public proc setHubURL {name}  { set _resources(-huburl) $name }
     45    public proc setSession {name} { set _resources(-session) $name }
    4246}
    4347
     
    4549proc tool_init_resources {} {
    4650    Rappture::resources::register \
    47         application_name Rappture::Tool::setAppName
     51        application_name Rappture::Tool::setAppName \
     52        application_id   Rappture::Tool::setAppId \
     53        hub_name         Rappture::Tool::setHubName \
     54        hub_url          Rappture::Tool::setHubURL \
     55        session_token    Rappture::Tool::setSession
    4856}
    4957                                                                               
     
    6674
    6775# ----------------------------------------------------------------------
    68 # USAGE: get ?-option?
     76# USAGE: resources ?-option?
    6977#
    7078# Clients use this to query information about the tool.
    7179# ----------------------------------------------------------------------
    72 itcl::body Rappture::Tool::get {{option ""}} {
    73     set values(-name) $_appname
     80itcl::body Rappture::Tool::resources {{option ""}} {
    7481    if {$option == ""} {
    75         return [array get values]
    76     }
    77     if {![info exists values]} {
    78         error "bad option \"$option\": should be [join [array names values] {, }]"
    79     }
    80     return $values($option)
     82        return [array get _resources]
     83    }
     84    if {![info exists _resources($option)]} {
     85        error "bad option \"$option\": should be [join [array names _resources] {, }]"
     86    }
     87    return $_resources($option)
    8188}
    8289
     
    114121    # tool name from the resources config file.
    115122    #
    116     if {"" != $_appname && "" == [$_xmlobj get tool.name]} {
    117         $_xmlobj put tool.name $_appname
     123    if {"" != $_resources(-appname) && "" == [$_xmlobj get tool.name]} {
     124        $_xmlobj put tool.name $_resources(-appname)
    118125    }
    119126
Note: See TracChangeset for help on using the changeset viewer.