[Laszlo-checkins] r7841 - in openlaszlo/branches/devildog: . 3rd-party WEB-INF/lps/lfc/debugger WEB-INF/lps/lfc/kernel/dhtml WEB-INF/lps/lfc/kernel/swf WEB-INF/lps/lfc/services/platform/dhtml WEB-INF/lps/lfc/views WEB-INF/lps/server/sc/src/org/openlaszlo/sc WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser WEB-INF/lps/server/src/org/openlaszlo/compiler docs/src docs/src/developers docs/src/developers/images docs/src/developers/programs examples/components laszlo-explorer/coverpages/welcome lps/components/utils/layouts test

dda@openlaszlo.org dda at openlaszlo.org
Wed Jan 16 12:58:47 PST 2008


Author: dda
Date: 2008-01-16 12:58:33 -0800 (Wed, 16 Jan 2008)
New Revision: 7841

Added:
   openlaszlo/branches/devildog/docs/src/developers/images/datarequest.png
Modified:
   openlaszlo/branches/devildog/
   openlaszlo/branches/devildog/3rd-party/index.html
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzTrace.lzs
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzInputText.lzs
   openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.lzs
   openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
   openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ASTIdentifier.java
   openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
   openlaszlo/branches/devildog/docs/src/build.xml
   openlaszlo/branches/devildog/docs/src/developers/constraints.dbk
   openlaszlo/branches/devildog/docs/src/developers/doc-toolchain.dbk
   openlaszlo/branches/devildog/docs/src/developers/programs/databinding-$9.lzx
   openlaszlo/branches/devildog/examples/components/style_example.html
   openlaszlo/branches/devildog/laszlo-explorer/coverpages/welcome/index.html
   openlaszlo/branches/devildog/lps/components/utils/layouts/simplelayout.lzx
   openlaszlo/branches/devildog/test/typevar.lzx
Log:
Merged revisions 7769-7840 via svnmerge from 
http://svn.openlaszlo.org/openlaszlo/trunk

.......
  r7775 | hqm | 2008-01-08 19:14:09 -0500 (Tue, 08 Jan 2008) | 28 lines
  
  Change 20080108-hqm-6 by hqm at DADDY_THNKPAD67 on 2008-01-08 17:21:21 EST
      in /cygdrive/c/users/hqm/openlaszlo/trunk/WEB-INF/lps/lfc
      for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc
  
  Summary:  fix for null-setter warning in lzloadlibrary
  
  New Features:
  
  Bugs Fixed: LPP-5189
  
  Technical Reviewer: andre
  QA Reviewer: ptw
  Doc Reviewer: 
  
  Documentation:
  
  Release Notes:
  
  Details:
      
  
  remove calls which used to apply to LzLibrary when it subclassed LzView 
  
  Tests:
  
  see bug report 
.......
  r7776 | max | 2008-01-08 21:59:23 -0500 (Tue, 08 Jan 2008) | 24 lines
  
  Change 20080106-maxcarlson-I by maxcarlson at Roboto.lan on 2008-01-06 22:14:21 PST
      in /Users/maxcarlson/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: Fix URI-unescaping in DHTML to convert + to spaces 
  
  New Features:
  
  Bugs Fixed: LPP-5277 - LzBrowser.urlUnescape does not unescape + chars on DHTML environment
  
  Technical Reviewer: ptw
  QA Reviewer: promanik
  Doc Reviewer: (pending)
  
  Documentation:
  
  Release Notes:
  
  Details: Convert + to ' ' before unescaping strings. 
      
  
  Tests: See LPP-5277
.......
  r7781 | lou | 2008-01-09 07:30:11 -0500 (Wed, 09 Jan 2008) | 15 lines
  
  Change 20080109-lou-3 by lou at loumac.local on 2008-01-09 08:24:57 AST
      in /Users/lou/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: update welcome screen to 4.1
  
  New Features:
  
  Bugs Fixed: LPP-5334
  
  Technical Reviewer: (pending)
  QA Reviewer: Mayme Kratt
  Doc Reviewer: (pending)
.......
  r7783 | lou | 2008-01-09 11:18:34 -0500 (Wed, 09 Jan 2008) | 15 lines
  
  Change 20080109-lou-h by lou at loumac.local on 2008-01-09 12:11:35 AST
      in /Users/lou/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: fix broken links in the dguide that were showing up as ???.
  
  Bugs Fixed: LPP-5342
  
  Technical Reviewer: (pending)
  QA Reviewer: (pending)
  Doc Reviewer: (pending)
  
  Tests: tested links
.......
  r7785 | lou | 2008-01-09 11:36:47 -0500 (Wed, 09 Jan 2008) | 12 lines
  
  Change 20080109-lou-o by lou at loumac.local on 2008-01-09 12:29:11 AST
      in /Users/lou/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: add image for data provider chapter
  
  Technical Reviewer: (pending)
  QA Reviewer: (pending)
  Doc Reviewer: (pending)
.......
  r7786 | ptw | 2008-01-09 12:22:19 -0500 (Wed, 09 Jan 2008) | 21 lines
  
  Change 20080109-ptw-G by ptw at dueling-banjos.local on 2008-01-09 12:11:23 EST
      in /Users/ptw/OpenLaszlo/ringding-clean
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: Fixing a hole where the rain gets in
  
  Bugs Fixed:
  LPP-5337 'Multiframe resource assigned via $style within a view that is init stage late runs a bit and gets orphaned in onidle'
  
  Technical Reviewer: max (message://<47844FEA.3000208@openlaszlo.org>)
  QA Reviewer: mdemmon (pending)
  
  Details:
      Consider the case where tracking is stopped before checkPlayStatus
      gets to run: Instead of using callOnIdle, which cannot be
      cancelled, register on onidle, so you can be cancelled.
  
  Tests:
      Test case from bug no longer leaves delegates on idle queue
.......
  r7788 | lou | 2008-01-09 14:19:48 -0500 (Wed, 09 Jan 2008) | 24 lines
  
  Change 20080109-lou-G by lou at loumac.local on 2008-01-09 15:13:52 AST
      in /Users/lou/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: fix problem where the tutorials were not loading glyphs
  
  New Features:
  
  Bugs Fixed: LPP-5216
  
  Technical Reviewer: (pending)
  QA Reviewer: (pending)
  Doc Reviewer: (pending)
  
  Details:
  because the tutorials are one directory level down from the dguide, the glyphs for
  conditionals such as DHTML, warning, etc. were not found.
  
  Modify build.xml to copy the glyphs directory (/includes) to the dguide where the
  tutorials can find them.
  
  Tests: verify visually
.......
  r7791 | hqm | 2008-01-09 16:02:32 -0500 (Wed, 09 Jan 2008) | 26 lines
  
  Change 20080109-hqm-6 by hqm at DADDY_THNKPAD67 on 2008-01-09 16:00:58 EST
      in /cygdrive/c/users/hqm/openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf
      for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf
  
  Summary:  fix for debugging info from lzloader 
  
  New Features:
  
  Bugs Fixed: LPP-5314
  
  Technical Reviewer: andre (pending)
  QA Reviewer: ptw
  Doc Reviewer:
  
  Documentation:
  
  Release Notes:
  
  Details:
      
  get the url from the correct place when debug string is generated
  
  
  Tests:
.......
  r7793 | bargull | 2008-01-09 17:02:01 -0500 (Wed, 09 Jan 2008) | 35 lines
  
  Change 20080106-bargull-2 by bargull at dell--p4--2-53 on 2008-01-06 17:19:46
      in /home/Admin/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: Adding maxlength for multiline-inputtext (DHTML)
  
  New Features:
  
  Bugs Fixed: LPP-4747 - "Edittext maxlength does not work"
  
  Technical Reviewer: max
  QA Reviewer: promanik
  Doc Reviewer: (pending)
  
  Documentation:
  
  Release Notes:
  
  Details:
  The HTML-<textarea> object does not support maxlength natively, so we need to implement a js-solution for DHTML.
  To get the best visual experience, I'm using the "onkeypress"-event, this way we can easily interrupt any user-input as soon as the maxlength for the inputtext has been reached.
  As keyboard-events are handled quite differently across all supported browsers, I needed to add a couple of new quirks to LzSprite, but most of them should be self-explanatory (also see http://www.quirksmode.org/js/keys.html).
  
  Pasting text into an inputtext is special-handled to match Flash's behaviour as much as possible:
  - for IE/Safari, I'm simply using the "onbeforepaste"-event
  - for Firefox/Opera, I need to detect paste manually because these browsers do not support "onbeforepaste"
  Flash-behaviour: you can only paste that much chars, as you have still available in the inputtext.
  
  Changes in LzText and LzInputText fixes two "stale-data" bugs: you cannot use LzInputText#text to retrieve the current text-value, because this property does not get updated when the user types in any text. Instead of that, you must use LzInputText#getText().
  
  
  Tests:
  see bug-description
.......
  r7794 | bargull | 2008-01-09 18:43:03 -0500 (Wed, 09 Jan 2008) | 25 lines
  
  Change 20080106-bargull-0 by bargull at dell--p4--2-53 on 2008-01-06 00:25:06
      in /home/Admin/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: Fix simplelayout optimization-bug
  
  New Features:
  
  Bugs Fixed: LPP-3812 - "simplelayout does not correctly position views that are programmatically created"
  
  Technical Reviewer: promanik
  QA Reviewer: frisco
  Doc Reviewer: (pending)
  
  Documentation:
  
  Release Notes:
  
  Details:
  You need to take last visible subview to compute new layout-position. Just taking the last subview leads to a bug when this view is non-visible. Also fixed another bug, so now new layout-position correctly respects inset-property.
  
  
  Tests:
.......
  r7802 | ptw | 2008-01-10 14:26:48 -0500 (Thu, 10 Jan 2008) | 27 lines
  
  Change 20080109-ptw-h by ptw at dueling-banjos.local on 2008-01-09 19:27:19 EST
      in /Users/ptw/OpenLaszlo/ringding-clean
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: Remove deprecation of datacontrolsvisibility
  
  Bugs Fixed:
  LPP-5066 '"datacontrolsvisibility" warning is out of date'
  
  Technical Reviewer: henry.minsky at gmail.com (verbal)
  QA Reviewer: a.bargull at intensis.de (pending)
  Doc Reviewer: lou at louiorio.com (pending)
  
  Documentation:
  datacontrolsvisibility attribute of datapaths has been deprecated for
  2 major releases and now is uhsupported, it should be removed from the
  documentation.
  
  Details:
      Henry already removed it from the schema and warns that it is bad,
      so I just removed the (now redundant) deprecation.
  
  Tests:
      The test case now yields the following compiler warning:
      lpp-5066.lzx:3:57: found an unknown attribute named "datacontrolsvisibility" on element datapath, check the spelling of this attribute name
.......
  r7806 | dda | 2008-01-10 14:45:34 -0500 (Thu, 10 Jan 2008) | 38 lines
  
  Change 20080109-dda-l by dda at lester.local on 2008-01-09 16:00:35 EST
      in /Users/dda/laszlo/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: Script compiler: Backported :* typing from devildog to trunk; added typing in 'for var in' statements.
  
  New Features: Any variable can be declared with :* (in addition to :typename as before).
  
  Bugs Fixed: LPP-5059
  
  Technical Reviewer: ptw (pending)
  QA Reviewer: hminsky (pending)
  Doc Reviewer: (pending)
  
  Documentation:
     Conforms with ECMAScript-4 draft standard.
  
  Release Notes:
  
  Details:
     One part of this change (:* types) is backported from devildog -
     the change was small and relatively independent and should have been
     made in trunk/RingDing before.
  
     The other part of this change is a small grammar change to allow
     typing in 'for var in' statements, like so:
       for (var:typename in xxx)
     or
       for (var:* in xxx)
     etc.
  
  Tests:
     smoketest
  
     Updated test/typevar.lzx to have a couple tests for 'for var in' and :*, which
     were not there before.
.......
  r7822 | lou | 2008-01-14 10:59:50 -0500 (Mon, 14 Jan 2008) | 23 lines
  
  Change 20080114-lou-Z by lou at loumac.local on 2008-01-14 11:52:34 AST
      in /Users/lou/src/svn/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: text was wrapping around example window badly.
  
  Bugs Fixed: LPP-5079
  
  Technical Reviewer: (pending)
  QA Reviewer: (pending)
  Doc Reviewer: (pending)
  
  Details: This is not really a bug, but a function of how wide the browser window is.
  If you make the browser window wide enough, the complete text appears to the right
  of the example window as designed.
  
  I did reduce the space between the example window and the text, so this is less likely
  to happen.
      
  
  Tests: visual check
.......
  r7828 | lou | 2008-01-14 14:21:33 -0500 (Mon, 14 Jan 2008) | 20 lines
  
  Change 20080114-lou-m by lou at loumac.local on 2008-01-14 15:17:18 AST
      in /Users/lou/src/svn/openlaszlo/trunk/docs/src
      for http://svn.openlaszlo.org/openlaszlo/trunk/docs/src
  
  Summary: fixed example 37.7, manipulating datapointers, in the dguide
  
  New Features:
  
  Bugs Fixed: LPP-5293
  
  Technical Reviewer: (pending)
  QA Reviewer: (pending)
  Doc Reviewer: (pending)
  
  Details: revert to the 3.4 version of the example
      
  
  Tests: visual check
.......
  r7833 | ptw | 2008-01-15 09:40:47 -0500 (Tue, 15 Jan 2008) | 19 lines
  
  Change 20080115-ptw-k by ptw at dueling-banjos.local on 2008-01-15 09:35:11 EST
      in /Users/ptw/OpenLaszlo/ringding-clean
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: Make Debug.trace work with 'traditional' Javascript objects
  
  Bugs Fixed:
  LPP-5359 'Debug.trace does not work for 'traditional' Javascript objects'
  
  Technical Reviewer: henry.minsky at gmail.com (pending)
  
  Details:
      Only use addProperty if the object is an instance of Instance,
      otherwise do it manually.
  
  Tests:
      IWFM
.......
  r7836 | mkratt | 2008-01-15 15:04:26 -0500 (Tue, 15 Jan 2008) | 1 line
  
  skip-pre-commit-checks Change Copyright from 2006 Laszlo Systems to 2005-2006, The Dojo Foundation, bypass because cannot have 2 copyrights
.......



Property changes on: openlaszlo/branches/devildog
___________________________________________________________________
Name: svnmerge-integrated
   - /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497 /openlaszlo/trunk:1-7768
   + /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497 /openlaszlo/trunk:1-7840

Modified: openlaszlo/branches/devildog/3rd-party/index.html
===================================================================
--- openlaszlo/branches/devildog/3rd-party/index.html	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/3rd-party/index.html	2008-01-16 20:58:33 UTC (rev 7841)
@@ -3,5 +3,5 @@
 <li>custom rhino jar from dojotoolkit.org. Rhino comes from <a href="http://www.mozilla.org/rhino">Mozilla</a>
 </li>
 </ul>
-<p>Copyright 2006 Laszlo Systems</p>
+<p>Copyright (c) 2005-2006, The Dojo Foundation</p>
 </html>

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzTrace.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzTrace.lzs	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzTrace.lzs	2008-01-16 20:58:33 UTC (rev 7841)
@@ -3,7 +3,7 @@
 /**
   * Support for tracing function calls in the debugger
   *
-  * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -79,10 +79,17 @@
       return r;
     };
     m._dbg_previous_definition = f;
-    who.addProperty(what, m);
+    // Use addProperty for our classes, otherwise just jam it in
+    if (who is Instance) {
+      who.addProperty(what, m);
+    } else {
+      who[what] = m;
+    }
+    return who[what] === m;
   } else {
     Debug.error('%w.%s is not a function', who, what);
   }
+  return false;
 }
 
 /**
@@ -105,12 +112,19 @@
       }
       // If that didn't work, apply previous
       if (who[what] !== p) {
-        who.addProperty(what, p);
+        // Use addProperty for our classes, otherwise just jam it in
+        if (who is Instance) {
+          who.addProperty(what, p);
+        } else {
+          who[what] = p;
+        }
       }
+      return who[what] === p;
     } else {
         Debug.error('%w.%s is not being traced', who, what);
     }
   } else {
     Debug.error('%w.%s is not a function', who, what);
   }
+  return false;
 }

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js	2008-01-16 20:58:33 UTC (rev 7841)
@@ -34,6 +34,7 @@
 // Should reflect CSS defaults in LzSprite.js
 LzInputTextSprite.prototype.____hpadding = 2;
 LzInputTextSprite.prototype.____wpadding = 2;
+LzInputTextSprite.prototype.____crregexp = new RegExp('\\r\\n', 'g');
 
 LzInputTextSprite.prototype.__createInputText = function(t) {
     if (this.__LzInputDiv) return;
@@ -216,8 +217,12 @@
         this.__LzInputDiv.onclick = function (e) { this.owner.__textEvent(e, 'onclick') }
         this.__LzInputDiv.onkeyup = function (e) { this.owner.__textEvent(e, 'onkeyup') }
         this.__LzInputDiv.onkeydown = function (e) { this.owner.__textEvent(e, 'onkeydown') }
+        this.__LzInputDiv.onkeypress = function (e) { this.owner.__textEvent(e, 'onkeypress') }
         this.__LzInputDiv.onselect = function (e) { this.owner.__textEvent(e, 'onselect') }
         this.__LzInputDiv.onchange = function (e) { this.owner.__textEvent(e, 'onchange') }
+        if (this.quirks.ie_paste_event || this.quirks.safari_paste_event) {
+            this.__LzInputDiv.onpaste = function (e) { this.owner.__pasteHandlerEx(e) }
+        }
     } else {
         this.__LzInputDiv.onblur = null;
         this.__LzInputDiv.onmousedown = null;
@@ -225,11 +230,108 @@
         this.__LzInputDiv.onclick = null;
         this.__LzInputDiv.onkeyup = null;
         this.__LzInputDiv.onkeydown = null;
+        this.__LzInputDiv.onkeypress = null;
         this.__LzInputDiv.onselect = null;
         this.__LzInputDiv.onchange = null;
+        if (this.quirks.ie_paste_event || this.quirks.safari_paste_event) {
+            this.__LzInputDiv.onpaste = null;
+        }
     }
 }
 
+LzInputTextSprite.prototype.__pasteHandlerEx = function (evt) {
+    if (this.multiline && this.owner.maxlength > 0) {
+        evt = evt ? evt : window.event;
+        
+        if (this.quirks.safari_paste_event) {
+            var clipboardTxt = evt.clipboardData.getData("text/plain");
+        } else {
+            var clipboardTxt = window.clipboardData.getData("TEXT");
+            clipboardTxt = clipboardTxt.replace(this.____crregexp, '\n');
+        }
+        
+        if (this.quirks.text_ie_carriagereturn) {
+            var len = this.__LzInputDiv.value.replace(this.____crregexp, '\n').length;
+        } else {
+            var len = this.__LzInputDiv.value.length;
+        }
+        
+        var selsize = this.getSelectionSize();
+        if (selsize < 0) selsize = 0;//[TODO anba 2008-01-06] remove after LPP-5330
+        var max = this.owner.maxlength + selsize;
+        var stopPaste = false;
+        
+        var maxchars = max - len;
+        if (maxchars > 0) {
+            var txt = clipboardTxt;
+            var txtLen = txt.length;
+            
+            if (txtLen > maxchars) {
+                txt = txt.substring(0, maxchars);
+                stopPaste = true;
+            }
+        } else {
+            var txt = "";
+            stopPaste = true;
+        }
+        
+        if (stopPaste) {
+            evt.returnValue = false;
+            if (evt.preventDefault) {
+                evt.preventDefault();
+            }
+            
+            if (txt.length > 0) {
+                if (this.quirks.safari_paste_event) {
+                    var val = this.__LzInputDiv.value;
+                    var selpos = this.getSelectionPosition();
+                    
+                    //update value
+                    this.__LzInputDiv.value = val.substring(0, selpos) + txt + val.substring(selpos + selsize);
+                    
+                    //fix selection
+                    this.__LzInputDiv.setSelectionRange(selpos + txt.length, selpos + txt.length);
+                } else {
+                    var range = document.selection.createRange();
+                    //this updates value and ensures right selection
+                    range.text = txt;
+                }
+            }
+        }
+    }
+}
+
+LzInputTextSprite.prototype.__pasteHandler = function () {
+    var selpos = this.getSelectionPosition();
+    var selsize = this.getSelectionSize();
+    var val = this.__LzInputDiv.value;
+    var that = this;
+    
+    //use 1ms timeout to give UI enough time for updating
+    setTimeout(function() {
+        var newval = that.__LzInputDiv.value;
+        var newlen = newval.length;
+        var max = that.owner.maxlength;
+        
+        if (newlen > max) {
+            var len = val.length;
+            var maxchars = max + selsize - len;
+            
+            //this was pasted
+            var newc = newval.substr(selpos, newlen - len + selsize);
+            //but we can only take at max that many chars
+            newc = newc.substring(0, maxchars);
+            
+            //update value
+            that.__LzInputDiv.value = val.substring(0, selpos) + newc + val.substring(selpos + selsize);
+            
+            //fix selection
+            //note: we're in Firefox/Opera, so we can savely call "setSelectionRange"
+            that.__LzInputDiv.setSelectionRange(selpos + newc.length, selpos + newc.length);
+        }
+    }, 1);
+}
+
 LzInputTextSprite.prototype.__textEvent = function ( e, eventname ){
     if (this.__LZdeleted == true) return;
     var keycode = e ? e.keyCode : event.keyCode;
@@ -258,6 +360,70 @@
         this.__setglobalclickable(true);
     }
 
+    if (this.multiline && this.owner.maxlength > 0) {
+        if (eventname == 'onkeypress') {
+            var evt = e ? e : event;
+            var charcode = this.quirks.text_event_charcode ? evt.charCode : evt.keyCode;
+            
+            /* BUG:
+             * env: Safari - Win
+             * -> last char is \n, delete per backspace, notice Safari-UI did update, 
+             *      but __LzInputDiv.value still holds the \n!
+             *    blur inputtext, focus again -> \n is again there, also in UI!
+             * what about Safari - Mac?
+             */
+            
+            //Debug.write("charCode = %s, keyCode = %s, ctrlKey = %s, altKey = %s, shiftKey = %s", charcode, keycode, evt.ctrlKey, evt.altKey, evt.shiftKey);
+            
+            if (!(evt.ctrlKey || evt.altKey) && (charcode || keycode == 13) && keycode != 8) {
+                var selsize = this.getSelectionSize();
+                //[TODO anba 2008-01-06] use selsize==0 when LPP-5330 is fixed
+                if (selsize <= 0) {
+                    if (this.quirks.text_ie_carriagereturn) {
+                        var val = this.__LzInputDiv.value.replace(this.____crregexp, '\n');
+                    } else {
+                        var val = this.__LzInputDiv.value;
+                    }
+                    
+                    var len = val.length, max = this.owner.maxlength;
+                    if (len >= max) {
+                        evt.returnValue = false;
+                        if (evt.preventDefault) {
+                            evt.preventDefault();
+                        }
+                    }
+                }
+            } else {
+                /* IE and Safari do not send 'onkeypress' for function-keys, */
+                /* but Firefox and Opera! */
+                if (this.quirks.keypress_function_keys) {
+                    if (evt.ctrlKey && !evt.altKey && !evt.shiftKey) {
+                        var c = String.fromCharCode(charcode);
+                        /* 'v' for Firefox and 'V' for Opera */
+                        if (c == 'v' || c == 'V') {
+                            //pasting per ctrl + v
+                            //[TODO anba 2008-01-06] how to detect paste per context-menu?
+                            var len = this.__LzInputDiv.value.length, max = this.owner.maxlength;
+                            if (len < max || this.getSelectionSize() > 0) {
+                                this.__pasteHandler();
+                            } else {
+                                evt.returnValue = false;
+                                if (evt.preventDefault) {
+                                    evt.preventDefault();
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    
+    if (eventname == 'onkeypress') {
+        /* we need to leave here, else LzInputText.inputtextevent(..) will freak out */
+        return;
+    }
+
     //Debug.info('__textEvent', eventname, keycode);
     if (this.owner) {
         // Generate the event. onkeyup/onkeydown sent by LzKeys.js
@@ -623,7 +789,11 @@
 }
 
 LzInputTextSprite.prototype.getText = function () {
-    return this.__LzInputDiv.value;
+    if (this.multiline && this.quirks.text_ie_carriagereturn) {
+        return this.__LzInputDiv.value.replace(this.____crregexp, '\n');
+    } else {
+        return this.__LzInputDiv.value;
+    }
 }
 
 LzInputTextSprite.prototype.getTextfieldHeight = function () {

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js	2008-01-16 20:58:33 UTC (rev 7841)
@@ -229,6 +229,11 @@
     ,text_measurement_use_insertadjacenthtml: false
     ,text_selection_use_range: false
     ,document_size_use_offsetheight: false
+    ,text_ie_carriagereturn: false
+    ,ie_paste_event: false
+    ,safari_paste_event: false
+    ,text_event_charcode: true
+    ,keypress_function_keys: true
 }
 
 LzSprite.prototype.capabilities = {
@@ -292,6 +297,16 @@
             // text size measurement uses insertAdjacentHTML()
             quirks['text_measurement_use_insertadjacenthtml'] = true;
             quirks['text_selection_use_range'] = true;
+            
+            // IE uses "\r\n" for newlines, which gives different text-lengths compared to SWF and
+            // to other browsers
+            quirks['text_ie_carriagereturn'] = true;
+            // IE has got a special event for pasting
+            quirks['ie_paste_event'] = true;
+            // IE does not send onkeypress for function keys
+            quirks['keypress_function_keys'] = false;
+            // IE does not use charCode for onkeypress
+            quirks['text_event_charcode'] = false;
         } else if (Lz.__BrowserDetect.isSafari) {
             // Fix bug in where if any parent of an image is hidden the size is 0
             // TODO: Tucker claims this is fixed in the latest version of webkit
@@ -313,6 +328,11 @@
             if (Lz.__BrowserDetect.version > 523.10) {
                 this.capabilities['rotation'] = true;
             }
+            
+            // Safari has got a special event for pasting
+            quirks['safari_paste_event'] = true;
+            // Safari does not send onkeypress for function keys
+            quirks['keypress_function_keys'] = false;
         } else if (Lz.__BrowserDetect.isOpera) {
             // Fix bug in where if any parent of an image is hidden the size is 0
             quirks['invisible_parent_image_sizing_fix'] = true;
@@ -320,6 +340,8 @@
             quirks['absolute_position_accounts_for_offset'] = true;
             quirks['canvas_div_cannot_be_clipped'] = true;
             quirks['document_size_use_offsetheight'] = true;
+            // Opera does not use charCode for onkeypress
+            quirks['text_event_charcode'] = false;
         } else if (Lz.__BrowserDetect.isFirefox && Lz.__BrowserDetect.version < 2) {
             // see http://groups.google.ca/group/netscape.public.mozilla.dom/browse_thread/thread/821271ca11a1bdbf/46c87b49c026246f?lnk=st&q=+focus+nsIAutoCompletePopup+selectedIndex&rnum=1
             quirks['firefox_autocomplete_bug'] = true;

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLibraryLoader.lzs	2008-01-16 20:58:33 UTC (rev 7841)
@@ -33,8 +33,6 @@
     //Debug.write("LzLibraryLoader.request() this.proxied=", this.proxied);
     var o = { libpath: req, url: req , lzt: "lib", proxied: this.proxied};
     super.request( o );
-    this.owner.setAttribute( "framesloadratio" , 0 );
-    this.owner.setAttribute( "loadratio" , 0 ); 
 }
 
 /**

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs	2008-01-16 20:58:33 UTC (rev 7841)
@@ -675,8 +675,8 @@
             if (timedout) { state = "timedout"; }
             // TODO: [2005-08-11 ptw] LzURL should be able to
             // parse a relative URL
-            var url = (new LzURL(this.reqobj.url)).file;
-            if (! url) { url = this.reqobj.url; }
+            var url = (new LzURL(this.url)).file;
+            if (! url) { url = this.url; }
             return Debug.formatToString("%s (%s)", url, state);
         }
     };

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as	2008-01-16 20:58:33 UTC (rev 7841)
@@ -1309,6 +1309,7 @@
     this.updatePlayStatus();
     this.__LZtracking = false;
     this.updatePlayDel.unregisterAll();
+    this.checkPlayStatusDel.unregisterAll();
 }
 
 
@@ -1364,7 +1365,7 @@
      if (('isaudio' in this.getMCRef()) && (this.getMCRef().isaudio == true)) this.__lzskipplaychecklimit = LzSprite.prototype.__lzskipplaychecklimitmax;
     
     //Debug.warn('checkPlayStatus %w %w %w %w', this.__lzcheckframe, this.frame, this.totalframes, this.__lzskipplaychecklimit);
-    LzIdle.callOnIdle( this.checkPlayStatusDel );
+    this.checkPlayStatusDel.register( LzIdle, "onidle" );
 }
 
 /**
@@ -1377,11 +1378,10 @@
     this.updatePlayStatus();
     this.__lzskipplaycheck++;
     if (this.__lzskipplaycheck < this.__lzskipplaychecklimit) {
-        LzIdle.callOnIdle( this.checkPlayStatusDel );
         return;
     }
+    this.checkPlayStatusDel.unregisterAll();
 
-
     if ( this.frame != this.__lzcheckframe || this.totalframes != this.__lzchecktotalframes){
         //Debug.write('checkPlayStatus2 tracking', this.frame, this.__lzcheckframe);
         this.trackPlay();

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/services/platform/dhtml/LzBrowser.js	2008-01-16 20:58:33 UTC (rev 7841)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @affects lzbrowser
@@ -264,7 +264,7 @@
   * @return: An URL decoded string
   */
 LzBrowser.urlUnescape = function (str) {
-    return unescape( str );
+    return unescape( str.split('+').join(' ') );
 }
 
 

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzInputText.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzInputText.lzs	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzInputText.lzs	2008-01-16 20:58:33 UTC (rev 7841)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -171,7 +171,7 @@
   * @access protected
   */
 function updateData (){
-    return this.sprite.text;
+    return this.sprite.getText();
 }
 
 

Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.lzs	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.lzs	2008-01-16 20:58:33 UTC (rev 7841)
@@ -1,6 +1,6 @@
 /**
   *
-  * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @access public
@@ -459,8 +459,9 @@
     this.maxlength = val;
     if (this.onmaxlength.ready) this.onmaxlength.sendEvent(val);
 
-    if(this.text && this.text.length > this.maxlength){
-        this.setText (this.text, true);
+    var t = this.getText();
+    if(t && t.length > this.maxlength){
+        this.setText (t, true);
     }
 }
 

Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt	2008-01-16 20:58:33 UTC (rev 7841)
@@ -851,9 +851,16 @@
      "for" "(" { setAllowIn(false); } Expression() { setAllowIn(true); } "in" Expression() ")" Statement()
 }
 
-void ForVarInStatement() #ForVarInStatement : {}
+void ForVarInStatement() #ForVarInStatement : {ASTIdentifier id; ASTIdentifier.Type type;}
 {
-     "for" "(" "var" Identifier() ({ setAllowIn(false); } [Initializer()] { setAllowIn(true); }) #EmptyExpression(jjtree.nodeArity()==0) "in" Expression() ")" Statement()
+     "for" "(" "var" id = Identifier()
+     (
+        [ ":" type = TypeIdentifier() { id.setType(type); } ]
+        { setAllowIn(false); }
+        [Initializer()]
+        { setAllowIn(true); }
+     ) #EmptyExpression(jjtree.nodeArity()==0)
+     "in" Expression() ")" Statement()
 }
 
 void ContinueStatement() #ContinueStatement : {}

Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ASTIdentifier.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ASTIdentifier.java	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ASTIdentifier.java	2008-01-16 20:58:33 UTC (rev 7841)
@@ -3,7 +3,7 @@
 * ****************************************************************************/
 
 /* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * J_LZ_COPYRIGHT_END *********************************************************/
 

Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java	2008-01-16 20:58:33 UTC (rev 7841)
@@ -3,7 +3,7 @@
  * ***************************************************************************/
 
 /* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * J_LZ_COPYRIGHT_END *********************************************************/
 
@@ -535,17 +535,6 @@
                 value = FontInfo.normalizeStyleString(value, false);
             }
 
-            if (name.toLowerCase().equals("datacontrolsvisibility")) {
-                env.warn(
-/* (non-Javadoc)
- * @i18n.test
- * @org-mes="The attribute \"datacontrolsvisibility\" is deprecated. " + "Use visible=\"null\" instead. " + "For future compatibility you should make this change to your source code."
- */
-            org.openlaszlo.i18n.LaszloMessages.getMessage(
-                NodeModel.class.getName(),"051018-497")
-                         ,element);
-            }
-
             if (name.toLowerCase().equals("defaultplacement")) {
                 if (value != null && value.matches("\\s*['\"]\\S*['\"]\\s*")) {
                     String oldValue = value;

Modified: openlaszlo/branches/devildog/docs/src/build.xml
===================================================================
--- openlaszlo/branches/devildog/docs/src/build.xml	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/docs/src/build.xml	2008-01-16 20:58:33 UTC (rev 7841)
@@ -329,6 +329,11 @@
     <copy todir="${local.output.dir}/resources" failonerror="false">
       <fileset dir="${local.build.dir}/resources"/>
     </copy>
+  	
+    <mkdir dir="${developers.output.dir}/includes"/>
+    <copy todir="${developers.output.dir}/includes" failonerror="false">
+      <fileset dir="${docs.output.dir}/includes"/>
+    </copy>
 
     <copy todir="${local.output.dir}">
       <fileset dir="${local.input.dir}" excludes="*.html,*.dbk,schemas.xml"/>

Modified: openlaszlo/branches/devildog/docs/src/developers/constraints.dbk
===================================================================
--- openlaszlo/branches/devildog/docs/src/developers/constraints.dbk	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/docs/src/developers/constraints.dbk	2008-01-16 20:58:33 UTC (rev 7841)
@@ -149,7 +149,7 @@
 canvas, the blue square will move as the mouse moves, floating
 relative to the position of the mouse.  In this case, the constraint
 expression includes a method call, but it works in the same way as the
-simple attribute expression in <xref linkend="ex.constraints.1"/>.</para>
+simple attribute expression in the previous example.</para>
 
 <example role="live-example">
    <title>Constrain to mouse position</title>
@@ -159,7 +159,7 @@
 </example>
 
 <para>The constraint expression may be almost any Javascript expression.  For
-example, you could change the y value in example <xref linkend="ex.constraints.1"/> to
+example, you could change the y value in the previous example to
 <literal>y="${immediateparent.getMouse('y')+10}"</literal> and cause the
 blue square to float below the mouse.  If you centered the blue square
 at the mouse position by setting the y value with

Modified: openlaszlo/branches/devildog/docs/src/developers/doc-toolchain.dbk
===================================================================
--- openlaszlo/branches/devildog/docs/src/developers/doc-toolchain.dbk	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/docs/src/developers/doc-toolchain.dbk	2008-01-16 20:58:33 UTC (rev 7841)
@@ -115,7 +115,7 @@
     </para>
     <para>This part of the toolchain unifies the various source material into js2doc format, then
       joins them together into a massive XML file, <literal>LaszloLibrary-verbose.js2doc</literal>.
-      To understand those processes, please review <xref id="js2doc-schema"/> to grasp the kinds of
+      To understand those processes, please review <xref linkend="js2doc-schema"/> to grasp the kinds of
       information that js2doc is trying to represent. The next three sections will walk through each
       of the three paths in the diagram above: from langref.xml, from javascript code, and from lzx
       source code, all to the js2doc intermediate format.</para>

Copied: openlaszlo/branches/devildog/docs/src/developers/images/datarequest.png (from rev 7836, openlaszlo/trunk/docs/src/developers/images/datarequest.png)

Modified: openlaszlo/branches/devildog/docs/src/developers/programs/databinding-$9.lzx
===================================================================
--- openlaszlo/branches/devildog/docs/src/developers/programs/databinding-$9.lzx	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/docs/src/developers/programs/databinding-$9.lzx	2008-01-16 20:58:33 UTC (rev 7841)
@@ -4,7 +4,7 @@
   
   <datapointer xpath="myData:/" ondata="processData()">
     <method name="processData">
-      this.selectChild(1); 
+      this.selectChild(2); 
       do {
         if (this.xpathQuery( '@show' ) == 'south park') {
             Debug.write(this.xpathQuery('lastName/text()'));

Modified: openlaszlo/branches/devildog/examples/components/style_example.html
===================================================================
--- openlaszlo/branches/devildog/examples/components/style_example.html	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/examples/components/style_example.html	2008-01-16 20:58:33 UTC (rev 7841)
@@ -2,7 +2,7 @@
 <!-- explanation page for  vacation survey                                  -->
 <!--                                                                       -->
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 <!--=======================================================================-->
@@ -16,7 +16,7 @@
       <script src="../../lps/includes/utils.js" type="text/javascript"></script>
       <title>Components Sampler</title>
       <style type="text/css">
-        .smallapp {margin-right: 100px;}
+        .smallapp {margin-right: 10px;}
       </style>
 
   </head>

Modified: openlaszlo/branches/devildog/laszlo-explorer/coverpages/welcome/index.html
===================================================================
--- openlaszlo/branches/devildog/laszlo-explorer/coverpages/welcome/index.html	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/laszlo-explorer/coverpages/welcome/index.html	2008-01-16 20:58:33 UTC (rev 7841)
@@ -2,7 +2,7 @@
 <!-- welcome/index.html                                                    -->
 <!--                                                                       -->
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 <!--=======================================================================-->
@@ -32,7 +32,7 @@
 </head>
 <body>
 <h2>
-Welcome to OpenLaszlo 4.0.5 
+Welcome to OpenLaszlo 4.1 
 </h2>
 <h1 style="margin-top: 2px">
 The open source platform for building rich internet applications
@@ -58,9 +58,9 @@
 <div id="left">
 <div class="column-in">
 <h3>
-OpenLaszlo 4.0.5 is the recommended platform for .swf development
+OpenLaszlo 4.1 is the recommended platform for .swf development
 </h3>
-With OpenLaszlo 4.0.5, there is no longer any reason to continue application development using OpenLaszlo 3.4. Support for DHTML applications remains at "beta" level; it will be fully supported with OL 4.1. This release has been tested by users world wide and vetted by the Laszlo Systems Quality Assurance team. Hundreds of improvements have been made since OpenLaszlo 4.0.  Please see the <a href="../../../docs/release-notes.html" target="_top">release notes</a> for a detailed description of new features in this release, changes since the last major release, and known problems.
+With OpenLaszlo 4.1, there is no longer any reason to continue application development using OpenLaszlo 3.4. Support for DHTML applications remains at "beta" level; it will be fully supported with OL 4.1. This release has been tested by users world wide and vetted by the Laszlo Systems Quality Assurance team. Hundreds of improvements have been made since OpenLaszlo 4.0.  Please see the <a href="../../../docs/release-notes.html" target="_top">release notes</a> for a detailed description of new features in this release, changes since the last major release, and known problems.
 </div>
 </div>
 

Modified: openlaszlo/branches/devildog/lps/components/utils/layouts/simplelayout.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/utils/layouts/simplelayout.lzx	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/lps/components/utils/layouts/simplelayout.lzx	2008-01-16 20:58:33 UTC (rev 7841)
@@ -28,18 +28,31 @@
     </method>
 
     <!--- @keywords private -->
-    <method name="addSubview" args="newsub">
+    <method name="addSubview" args="newsub"><![CDATA[
         this.updateDelegate.register( newsub,  "on" + this.sizeAxis);
         this.updateDelegate.register( newsub,  "onvisible" );
         //this is an optimization to avoid calling update in the simple case
         //where a single subview was just added
-        if ( ! this.locked &amp;&amp; this.subviews.length ){
-            var s= this.subviews[ this.subviews.length-1 ];
-            var p =  s[ this.axis ] + s[ this.sizeAxis ] + this.spacing;
-            newsub.setAttribute( this.axis , p  ) ;
+        if (!this.locked) {
+            var rv = null;
+            var sv = this.subviews;
+            for (var i = sv.length-1; i >= 0; --i) {
+                if (sv[i].visible) {
+                    rv = sv[i];
+                    break;
+                }
+            } 
+            
+            if (rv) {
+                var p = rv[ this.axis ] + rv[ this.sizeAxis ] + this.spacing;
+            } else {
+                var p = this.inset;
+            }
+            
+            newsub.setAttribute(this.axis, p);
         }
         super.addSubview( newsub );
-    </method>
+    ]]></method>
 
     <!--- This method is usually called automatically when any of the views
           controlled by the layout change their size in the layout axis, or
@@ -64,7 +77,7 @@
 </class>
 </library>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 <!-- @LZX_VERSION@                                                         -->

Modified: openlaszlo/branches/devildog/test/typevar.lzx
===================================================================
--- openlaszlo/branches/devildog/test/typevar.lzx	2008-01-16 20:01:23 UTC (rev 7840)
+++ openlaszlo/branches/devildog/test/typevar.lzx	2008-01-16 20:58:33 UTC (rev 7841)
@@ -16,6 +16,7 @@
       var v_typed_init:int = val * 2;
       var v_typed_q:int? = 123;
       var v_typed_ex:int! = 234;
+      var v_star:* = 345;
 
       // These must be set before use
       v_plain = 99;
@@ -71,6 +72,27 @@
          estatus.setText("FAIL 7");
       }
 
+      if (v_star == 345) {
+         Debug.write("test8 passed");
+      } else {
+         Debug.write("FAIL: test8");
+         estatus.setText("FAIL 8");
+      }
+
+      var arr = [0,1,2];
+      var s = "";
+      for (var fv_star:* in arr) {
+          s += fv_star;
+      }
+
+      // There is no guarantee about the ordering of for var in
+      if (s == "012" || s == "021" || s == "102" || s == "120" || s == "201" || s == "210") {
+         Debug.write("test9 passed");
+      } else {
+         Debug.write("FAIL: test9");
+         estatus.setText("FAIL 9, got: " + s);
+      }
+
     </method>
   </view>
 
@@ -84,6 +106,6 @@
 
 </canvas>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->



More information about the Laszlo-checkins mailing list