Author: bargull
Date: 2007-10-21 14:46:39 -0700 (Sun, 21 Oct 2007)
New Revision: 6941

Modified:
   openlaszlo/trunk/lps/components/base/basewindow.lzx
Log:
Change 20071003-bargull-8 by [EMAIL PROTECTED] on 2007-10-03 17:45:40
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: basewindow does not properly update "windowlist"

New Features:

Bugs Fixed:
LPP-4617 - basewindow does not properly update "windowlist"

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

Documentation:

Release Notes:

Details:
Added check in basewindow#setVisible(..) to ensure the window is part of its 
parent's windowlist.
Updated basewindow#sendInFrontOf(..) and basewindow#sendBehind(..) to protect 
against bad values. 


Tests:
see testcase at LPP-4617



Modified: openlaszlo/trunk/lps/components/base/basewindow.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basewindow.lzx 2007-10-21 11:30:02 UTC 
(rev 6940)
+++ openlaszlo/trunk/lps/components/base/basewindow.lzx 2007-10-21 21:46:39 UTC 
(rev 6941)
@@ -247,21 +247,23 @@
         <method name="setVisible" args="isVisible"> <![CDATA[
             super.setVisible(isVisible);
             if (isVisible) {
-                //need to add this window to the parent's windowlist
-                var foundMe = false;
-                var wlist = parent.options["windowlist"];
-                var len = wlist.length;
-                for (var i=0; i < len; ++i) {
-                    if (wlist[i] == this){
-                        foundMe = true;
-                        break;
+                if (this.isinited) {
+                    //need to add this window to the parent's windowlist
+                    var foundMe = false;
+                    var wlist = parent.options["windowlist"];
+                    var len = wlist.length;
+                    for (var i=0; i < len; ++i) {
+                        if (wlist[i] == this){
+                            foundMe = true;
+                            break;
+                        }
                     }
+                    
+                    if (!foundMe) {
+                        wlist[len] = this;
+                    }
                 }
                 
-                if (!foundMe) {
-                    wlist[len] = this;
-                }
-                
                 this.setAttribute('haswindowfocus', true);
             } else {
                 this._removeFromWindowlist();


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

Reply via email to