Author: bargull
Date: 2007-09-23 01:14:57 -0700 (Sun, 23 Sep 2007)
New Revision: 6559

Modified:
   openlaszlo/trunk/lps/components/base/basewindow.lzx
Log:
Change 20070922-bargull-0 by [EMAIL PROTECTED] on 2007-09-22 22:15:29
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: basewindow must include basecomponent

New Features:

Bugs Fixed:
LPP-4758 "basewindow must include basecomponent"

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

Documentation:

Release Notes:

Details:
Applications which use solely basewindow do not compile without this change.
Just added the include-tag for basecomponent.lzx in basewindow.lzx


Tests:
see testcase at LPP-4758



Modified: openlaszlo/trunk/lps/components/base/basewindow.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basewindow.lzx 2007-09-23 07:30:00 UTC 
(rev 6558)
+++ openlaszlo/trunk/lps/components/base/basewindow.lzx 2007-09-23 08:14:57 UTC 
(rev 6559)
@@ -5,6 +5,7 @@
 <!-- @LZX_VERSION@                                                         -->
 <library>
 
+<include href="base/basecomponent.lzx" />
 <include href="utils/states/dragstate.lzx"/>
 <include href="utils/states/resizestatemin.lzx"/>
 
@@ -109,9 +110,9 @@
         <method name="sendInFrontOf" args="v"> <![CDATA[
             var wlist = parent.options['windowlist'];
             if (this.visible) {
-                this._removeFromWindowlist();
-                for (var i in wlist) {
+                for (var i=0; i < wlist.length; ++i) {
                     if (wlist[i]==v) {
+                        this._removeFromWindowlist();
                         wlist.splice(i+1,0,this);
                         break;
                     }
@@ -127,9 +128,9 @@
         <method name="sendBehind" args="v"> <![CDATA[
             var wlist = parent.options['windowlist'];
             if (this.visible) {
-                this._removeFromWindowlist();
-                for (var i in wlist) {
+                for (var i=0; i < wlist.length; ++i) {
                     if (wlist[i]==v) {
+                        this._removeFromWindowlist();
                         wlist.splice(i,0,this);
                         break;
                     }
@@ -246,6 +247,21 @@
         <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 (!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