Hi,

I'm having a problem (or perhaps just a misunderstanding?) using
OpenLaszlo 3.3.3

When I run the code below, the checkbox onvalue handler is invoked 6
times. The first 3 times, the 'pos' value is returned as NaN (not a
number), while the last 3 times it is invoked and the 'pos' value is
printed as 2 than 3 than 3.

Thereafter, check/uncheck onvalue handler reports the correct row
number.

Also, while I think it may have already been reported via Jira, the
checkbox value="false" is being ignored.

I'm just looking to split the cards -- is it me or an OL bug?

Thanks (again) for the help,
Ed




<canvas height="500" width="500" debug="true">
  <dataset name="myData">
    <myXML>
      <person>
        <firstName>Homer</firstName>
        <lastName>Simpson</lastName>
      </person>
     <person>
       <firstName>Marge</firstName>
       <lastName>Simpson</lastName>
     </person>
     <person>
       <firstName>Bart</firstName>
       <lastName>Simpson</lastName>
       </person>
    </myXML>
  </dataset>
  <view>
    <grid datapath="myData:/myXML" contentdatapath="person">
      <gridcolumn sortable="false">Index
        <checkbox xoffset="${10-parent.width/2}" 
                  datapath="position()" 
                  value="false" 
                  text="$always{this.data}">
          <handler name="onvalue">
          <![CDATA[
             var pos = new Number(
this.datapath.xpathQuery('position()'));
             Debug.write('onvalue for row ',pos);
          ]]>
          </handler>
        </checkbox>
      </gridcolumn>
      <gridtext editable="false"
datapath="firstName/text()">First</gridtext>
      <gridtext editable="false"
datapath="lastName/text()">Last</gridtext>
    </grid>
  </view>
</canvas>

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to