|
|
|
testcase:
<canvas debug="true" > <dataset name="site_ds"> <menu mname="AAA" value="0" statename="stateA" /> <menu mname="BBB" value="10" statename="stateB" /> </dataset> <datapointer name="readState" xpath="" /> <radiogroup name="menu_group" datapath="site_ds:/" > <attribute name="dirty" value="null" /> <!-- sel: radiobutton --> <handler name="onselect" args="sel" > if( dirty != sel ){ canvas.switchState( sel.datapath ); canvas.readState.setFromPointer( sel.datapath ); dirty = sel; } </handler> <radiobutton name="m" datapath="menu" text="$path{'@mname'}" value="$path{'@value'}" /> </radiogroup> <!-- dpMenu: LzDatapath --> <method name="switchState" args="dpMenu"> Debug.write( dpMenu.getNodeAttribute( "mname" ) ); Debug.write( dpMenu.getNodeAttribute( "value" ) ); Debug.write( dpMenu.getNodeAttribute( "statename" ) ); Debug.write( "---" ); </method> </canvas> Author: max
Date: 2007-08-17 17:08:10 -0700 (Fri, 17 Aug 2007) New Revision: 6135 Modified: openlaszlo/branches/wafflecone/lps/components/lz/radio.lzx Log: Change 20070817-maxcarlson-j by maxcarlson@plastik on 2007-08-17 13:59:45 PDT in /Users/maxcarlson/openlaszlo/wafflecone for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone Summary: Clean up radio New Features: Bugs Fixed: Technical Reviewer: jcrowley QA Reviewer: promanik Doc Reviewer: (pending) Documentation: Release Notes: Details: Per Tests: See Modified: openlaszlo/branches/wafflecone/lps/components/lz/radio.lzx =================================================================== --- openlaszlo/branches/wafflecone/lps/components/lz/radio.lzx 2007-08-17 23:26:58 UTC (rev 6134) +++ openlaszlo/branches/wafflecone/lps/components/lz/radio.lzx 2007-08-18 00:08:10 UTC (rev 6135) @@ -33,6 +33,12 @@ <method name="applyData" args="d"> //try to find the relevant radio button, or clear selection if none this._setvalue( d ); + var item = null; + if (d != null) { + item = this.getItem( d ); + } + if ( item ) this.select( item ); + else this.clearSelection(); </method> <!--- @keywords private --> @@ -44,8 +50,6 @@ item = this.getItem( val ); } this.value = val; - if ( item ) this.select( item ); - else this.clearSelection(); } else { this.value = val; } @@ -156,13 +160,6 @@ </method> <!--- @keywords private --> - <handler name="onclick"> - if (!this.selected) { - parent.select(this); - } - </handler> - - <!--- @keywords private --> <method name="setHilite" args="dohilite"> _title.setAttribute('fgcolor', dohilite ? style.texthilitecolor : style.textcolor); _______________________________________________ Laszlo-checkins mailing list Laszlo-checkins@openlaszlo.org http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins (wafflecone branch local build r6155)
Closing. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is a significant bug - 4.0 would have been a great time to fix it. Without debugging, it's easy to miss, causing hidden extra processing.