Changeset 2158


Ignore:
Timestamp:
Mar 27, 2011, 3:14:54 PM (13 years ago)
Author:
mmc
Message:

Integrated the new -tooltip support into the builder and added tooltips
for the Tool section. Also, fixed a problem whereby you would load an
XML file and then switch to another, and the program would prompt you
to save changes, even though nothing was changed. Empty strings were
being inserted into the XML causing it to appear different than the
original. That's fixed now.

Location:
trunk/builder/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/builder/scripts/main.tcl

    r2155 r2158  
    190190
    191191    if {$what == "-new"} {
    192         set xmlobj [Rappture::LibraryObj ::#auto "<?xml version=\"1.0\"?><run/>"]
    193         $xmlobj put tool.command ""
     192        set xmlobj [Rappture::LibraryObj ::#auto "<?xml version=\"1.0\"?><run><tool/></run>"]
    194193    } else {
    195194        if {$what == "-file"} {
     
    10311030
    10321031    # copy the ToolXml object and pass to analyzer to show outputs
    1033     set synthrun [Rappture::LibraryObj ::#auto "<?xml version=\"1.0\"?><run/>"]
     1032    set synthrun [Rappture::LibraryObj ::#auto "<?xml version=\"1.0\"?><run><tool/></run>"]
    10341033    $synthrun copy "" from $ToolXml ""
    10351034    $f.analyze load $synthrun
     
    12461245                }
    12471246                lappend atargs -$key $val
     1247            }
     1248
     1249            # add any tooltip info for this attribute
     1250            if {[info exists info(-tooltip)] && $info(-tooltip) ne ""} {
     1251                lappend atargs -tooltip $info(-tooltip)
    12481252            }
    12491253
  • trunk/builder/scripts/tool.rp

    r2155 r2158  
    22    help http://rappture.org/wiki/rappture_xml_elements
    33
    4     attr title -type string -path title
    5     attr description -type string:lines=6 -expand yes -path about
    6     attr command -title "Program" -type language -path command
     4    attr title -type string -path title -tooltip "Sets the title of your tool, which usually appears on the right-hand side of your tool when it first starts up."
     5
     6    attr description -type string:lines=6 -expand yes -path about -tooltip "A few paragraphs describing your tool, which usually appear just below the title on the right-hand side of your tool when it first starts up."
     7
     8    attr command -title "Program" -type language -path command -tooltip "Sets the programming language used to implement your underlying simulation tool.  This determines the command line that Rappture will use to invoke your tool."
     9
    710
    811    check title {
Note: See TracChangeset for help on using the changeset viewer.