|
|
|
[
Permlink
| « Hide
]
Elliot Winard - 05/Mar/08 11:53 AM
attached file. I see this bug in pagan-deities.
Er, it seems to me that this is an application bug. Handlers will get fired any time the attribute they are listening to are changed, including when they get their initial value. It seems to me the handler needs to filter out based on what the new value is (like a transition from false to true).
but if selectfirst is set to false I wouldn't expect anything to be selected. The existing code we have filters out null selections but it'd be a little prettier if we didn't have to special-case for that.
"backtrace":
basedatacombobox#init(..) -> defaulttext is null -> basedatacombobox#_updateSelectionOnData() -> basedatacombobox#_updateSelectionByIndex(this._selectedIndex, true) > Oops. Itchy trigger finger.
Me too :o) "backtrace": basedatacombobox#init(..) -> defaulttext is null -> basedatacombobox#_updateSelectionOnData() -> basedatacombobox#_updateSelectionByIndex(this._selectedIndex, true) But "_selectedIndex" is -1. Fix: either check "_selectedIndex"!=-1 before calling "_updateSelectionByIndex(..)", or check index in "_updateSelectionByIndex(..)" (Does it make sense to call that function with a negative index?). The change for
Author: max
Date: 2008-03-12 17:18:34 -0700 (Wed, 12 Mar 2008) New Revision: 8239 Modified: openlaszlo/trunk/lps/components/base/basedatacombobox.lzx Log: Change 20080312-maxcarlson-D by maxcarlson@Roboto.local on 2008-03-12 14:57:41 PDT in /Users/maxcarlson/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fix bogus calls to basedatacombobox._updateSelectionByIndex() New Features: Bugs Fixed: Technical Reviewer: promanik QA Reviewer: enw@laszlosystems.com Doc Reviewer: (pending) Documentation: Release Notes: Details: Make sure the index is valid in _updateSelectionByIndex(); Tests: See Modified: openlaszlo/trunk/lps/components/base/basedatacombobox.lzx =================================================================== --- openlaszlo/trunk/lps/components/base/basedatacombobox.lzx 2008-03-12 21:59:56 UTC (rev 8238) +++ openlaszlo/trunk/lps/components/base/basedatacombobox.lzx 2008-03-13 00:18:34 UTC (rev 8239) @@ -1,5 +1,5 @@ <!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** -* Copyright 2005-2007 Laszlo Systems, Inc. All Rights Reserved. * +* Copyright 2005-2008 Laszlo Systems, Inc. All Rights Reserved. * * Use is subject to license terms. * * X_LZ_COPYRIGHT_END ****************************************************** --> <!-- @LZX_VERSION@ --> @@ -236,6 +236,7 @@ @keywords private --> <method name="_updateSelectionByIndex" args="index,dontSetValue,isinitvalue"> <![CDATA[ + if (index < 0) return; var dp = new LzDatapointer(this); var nodes = dp.xpathQuery(this.itemdatapath); _______________________________________________ Laszlo-checkins mailing list Laszlo-checkins@openlaszlo.org http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins (pagan-deities branch build r8311 - 4.0.11 RC)
Ran BUG-datacombobox.lzx and it doesn't appear to run correctly. Spoke with Elliot and EM-5327 is not fixed. Checked for the code changes in lps/components/base/basedatacombobox.lzx and it isn't there. (pagan-deities branch build r8434 - mars rc/4.0.11)
Test file runs and lps/components/base/basedatacombobox.lzx contains the fix. (trunk 4 build r9425)
Needed to change the testfile because of changes to the code. Attached new example. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||