[Laszlo-checkins] r11329 - openlaszlo/trunk/lps/components/base
hqm@openlaszlo.org
hqm at openlaszlo.org
Thu Oct 2 18:37:45 PDT 2008
Author: hqm
Date: 2008-10-02 18:37:43 -0700 (Thu, 02 Oct 2008)
New Revision: 11329
Modified:
openlaszlo/trunk/lps/components/base/baselist.lzx
openlaszlo/trunk/lps/components/base/baselistitem.lzx
Log:
Change 20081002-hqm-o by hqm at badtzmaru.home on 2008-10-02 09:42:29 EDT
in /Users/hqm/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: revised fix for combobox list item selection
New Features:
Bugs Fixed: LPP-7057
Technical Reviewer: a.bargull
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ add 'abstract' setHilite method to baselistitem
+ check that hiliteview is a view before calling setHilite
Tests:
bug in test case now runs without runtime error in swf9
Modified: openlaszlo/trunk/lps/components/base/baselist.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/baselist.lzx 2008-10-03 00:54:33 UTC (rev 11328)
+++ openlaszlo/trunk/lps/components/base/baselist.lzx 2008-10-03 01:37:43 UTC (rev 11329)
@@ -50,7 +50,7 @@
<method name="doEnterDown">
<![CDATA[
// TODO: [hqm 2006-09] LPP-2819 _hiliteview is null sometimes, why?
- if ( this._hiliteview && this._hiliteview.enabled) {
+ if ( this._hiliteview is lz.view && this._hiliteview.enabled) {
this._hiliteview.setAttribute('selected', true);
}
]]>
@@ -97,8 +97,9 @@
if (this['_selector']) {
var sel = this._selector.getSelection();
if (sel && sel.length > 0) {
- var selectedview =_selector.getNextSubview(sel[0]);
- this._hiliteview = selectedview;
+ if (sel[0] is lz.view) {
+ this._hiliteview = sel[0];
+ }
}
}
]]>
@@ -109,7 +110,7 @@
<!--- @keywords private -->
<method name="_doblur" args="ignore">
<![CDATA[
- if (this._hiliteview) {
+ if (this._hiliteview is lz.view) {
this._hiliteview.setHilite(false);
}
this._hiliteview = null;
@@ -121,9 +122,9 @@
<method name="setHilite" args="v" >
<![CDATA[
if (this._selector.allowhilite(v)) {
- if ( this._hiliteview ) this._hiliteview.setHilite(false);
+ if ( this._hiliteview is lz.view ) this._hiliteview.setHilite(false);
this._hiliteview = v;
- if (this._hiliteview ) {
+ if (v is lz.view ) {
v.setHilite(true);
}
}
@@ -136,7 +137,7 @@
<method name="_dokeydown" args="kc">
<![CDATA[
/* select item on 'space' key */
- if (kc == 32 && this._hiliteview && this._hiliteview.enabled) {
+ if (kc == 32 && this._hiliteview is lz.view && this._hiliteview.enabled) {
this._hiliteview.setAttribute('selected', true);
// this._hiliteview.setHilite(false);
return;
@@ -162,7 +163,7 @@
if (kc == 37 || kc == 38) {
next = _selector.getNextSubview(s, -1);
}
- if ( this._hiliteview && this._hiliteview != 0 ) {
+ if ( this._hiliteview != 0 && this._hiliteview is lz.view ) {
this._hiliteview.setHilite(false);
}
next.setHilite(true);
@@ -385,7 +386,7 @@
}
}
- if ( this._hiliteview && this._hiliteview['enabled']) {
+ if ( this._hiliteview is lz.view && this._hiliteview['enabled']) {
this._hiliteview.setHilite(false);
this._hiliteview = null;
}
Modified: openlaszlo/trunk/lps/components/base/baselistitem.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/baselistitem.lzx 2008-10-03 00:54:33 UTC (rev 11328)
+++ openlaszlo/trunk/lps/components/base/baselistitem.lzx 2008-10-03 01:37:43 UTC (rev 11329)
@@ -113,6 +113,12 @@
]]>
</method>
+ <!--- Sets this item to be highlighted to distinguish it in a list of items.
+ -->
+ <method name="setHilite" args="hilite">
+ // abstract base method
+ </method>
+
<doc>
<tag name="shortdesc"><text>a group of these are managed by a baselist</text></tag>
<text>
More information about the Laszlo-checkins
mailing list