Changeset 3770


Ignore:
Timestamp:
Jul 10, 2013, 3:03:25 PM (11 years ago)
Author:
mmc
Message:

Fixed a problem with the resultset that surfaced during the "letters"
assignment in the summer bootcamp. With two results, the "Number of
Words" plot would show one result but not the other. The problem was
that one parameter would be something like "abc", and the other would
have spaces like "abc def". The resultset was not reporting diffs
properly for any value like that with spaces in it.

Also fixed a small problem in the tester diff method for boolean values.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/zoo/periodicelement/tool.xml

    r1631 r3770  
    11<?xml version="1.0"?>
    22<run>
    3  <tool>
    4   <about>Press Simulate to view results.</about>
    5   <command>tclsh @tool/test.tcl @driver</command>
    6  </tool>
    7  <input>
    8   <periodicelement id="first">
    9    <about>
    10     <label>First Element</label>
    11     <description>Select the first element.</description>
    12    </about>
    13    <default>As</default>
    14   </periodicelement>
    15   <periodicelement id="second">
    16    <about>
    17     <label>Second Element</label>
    18     <description>Select the second element.</description>
    19    </about>
    20    <default>O</default>
    21    <inactive>lanthanoid actinoid</inactive>
    22    <returnvalue>symbol</returnvalue>
    23   </periodicelement>
    24   <periodicelement id="third">
    25    <about>
    26     <label>Third Element</label>
    27     <description>Select the third element.</description>
    28    </about>
    29    <default>C</default>
    30    <active>other-non-metal</active>
    31    <returnvalue>weight</returnvalue>
    32   </periodicelement>
    33  </input>
     3    <tool>
     4        <about>Press Simulate to view results.</about>
     5        <command>tclsh @tool/test.tcl @driver</command>
     6    </tool>
     7    <input>
     8        <periodicelement id="first">
     9            <about>
     10                <label>First Element</label>
     11                <description>Select the first element.</description>
     12            </about>
     13            <default>As</default>
     14            <returnvalue>name</returnvalue>
     15        </periodicelement>
     16        <periodicelement id="second">
     17            <about>
     18                <label>Second Element</label>
     19                <description>Select the second element.</description>
     20            </about>
     21            <default>Oxygen</default>
     22            <returnvalue>name symbol number weight</returnvalue>
     23            <inactive>actinoid lanthanoid</inactive>
     24        </periodicelement>
     25        <periodicelement id="third">
     26            <about>
     27                <label>Third Element</label>
     28                <description>Select the third element.</description>
     29            </about>
     30            <default>Carbon</default>
     31            <returnvalue>weight</returnvalue>
     32            <active>other-non-metal</active>
     33        </periodicelement>
     34    </input>
    3435</run>
  • trunk/gui/scripts/resultset.tcl

    r3330 r3770  
    248248            set irun [lindex [$_results find -format xmlobj $which] 0]
    249249            if {$irun ne ""} {
    250                 set val [$_results get -format $col $irun]
     250                set val [lindex [$_results get -format $col $irun] 0]
    251251                array set val2norm $rlist
    252252                if {[info exists val2norm($val)]} {
  • trunk/lang/tcl/scripts/objects/boolean/boolean.rp

    r3177 r3770  
    5656        if {$_val && !$_val2} {
    5757            return 1
    58         } elseif {!$_val && $_val} {
     58        } elseif {!$_val && $_val2} {
    5959            return -1
    6060        }
Note: See TracChangeset for help on using the changeset viewer.