[Laszlo-checkins] r11309 - openlaszlo/trunk/lps/components/base

hqm@openlaszlo.org hqm at openlaszlo.org
Wed Oct 1 20:28:59 PDT 2008


Author: hqm
Date: 2008-10-01 20:28:58 -0700 (Wed, 01 Oct 2008)
New Revision: 11309

Modified:
   openlaszlo/trunk/lps/components/base/baselist.lzx
Log:
Change 20081001-hqm-S by hqm at badtzmaru.home on 2008-10-01 22:28:30 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: combobox gets error in swf9

New Features:

Bugs Fixed: LPP-7057

Technical Reviewer: promanik
QA Reviewer: mamye
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
 
+ ensure that selection returned by selectionmanager points to a view

The baselist class tries to hilite the current selection, and if the
replication is 'lazy', the selection manager will return a
LzDatapointer instead of a view. This change just checks that the
thing being hilited is a view. There might be some better way to
ensure this, but it only seems to be an issue when the list is first
displayed.

Tests:

test case from bug report



Modified: openlaszlo/trunk/lps/components/base/baselist.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/baselist.lzx	2008-10-02 03:17:56 UTC (rev 11308)
+++ openlaszlo/trunk/lps/components/base/baselist.lzx	2008-10-02 03:28:58 UTC (rev 11309)
@@ -97,7 +97,8 @@
                 if (this['_selector']) {
                     var sel = this._selector.getSelection();
                     if (sel && sel.length > 0) {
-                        this._hiliteview = sel[0];
+                        var selectedview =_selector.getNextSubview(sel[0]);
+                        this._hiliteview = selectedview;
                     }
                 }
             ]]>
@@ -108,7 +109,7 @@
         <!--- @keywords private -->
         <method name="_doblur" args="ignore">
         <![CDATA[
-          if (this._hiliteview && this._hiliteview['setHilite']) {
+          if (this._hiliteview) {
               this._hiliteview.setHilite(false);
           }
           this._hiliteview = null;
@@ -120,10 +121,10 @@
         <method name="setHilite" args="v" >
         <![CDATA[
             if (this._selector.allowhilite(v)) {
-                if ( this._hiliteview && this._hiliteview['setHilite']) this._hiliteview.setHilite(false);
+                if ( this._hiliteview ) this._hiliteview.setHilite(false);
                 this._hiliteview = v;
-                if (this._hiliteview) {
-                    v['setHilite'](true);
+                if (this._hiliteview ) {
+                    v.setHilite(true);
                 }
             }
         ]]>    
@@ -161,10 +162,10 @@
                 if (kc == 37  || kc == 38) {
                     next = _selector.getNextSubview(s, -1);
                 }
-                if ( this._hiliteview && this._hiliteview['setHilite'] && this._hiliteview != 0 ) {
+                if ( this._hiliteview && this._hiliteview != 0 ) {
                     this._hiliteview.setHilite(false);
                 }
-                next['setHilite'](true);
+                next.setHilite(true);
                 this._hiliteview = next;
              }
             ]]>
@@ -384,7 +385,7 @@
                 }
             }
 
-            if ( this._hiliteview && this._hiliteview['setHilite'] && this._hiliteview['enabled']) {
+            if ( this._hiliteview && this._hiliteview['enabled']) {
                 this._hiliteview.setHilite(false);
                 this._hiliteview = null;
             }



More information about the Laszlo-checkins mailing list