Author: ptw
Date: 2007-08-31 07:23:13 -0700 (Fri, 31 Aug 2007)
New Revision: 6299

Modified:
   openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/core/LzDefs.lzs
Log:
Change 20070830-ptw-B by [EMAIL PROTECTED] on 2007-08-30 17:11:24 EDT
    in /Users/ptw/OpenLaszlo/wafflecone-2
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Make LzInheritedHash work again

Bugs Fixed:
LPP-4540 'Laszlo Explorer hierarchical menu does not display in 
dhtml/firefox/opera/safari'

Technical Reviewer: hqm (Message-ID: <[EMAIL PROTECTED]>)
QA Reviewer: max (pending)

Details:
    Don't try to set instance constructor, which seems to break Javascript

Tests:
    Max's test case from Jira works correctly in non-debug DHTML



Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/core/LzDefs.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/core/LzDefs.lzs      
2007-08-31 13:50:37 UTC (rev 6298)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/core/LzDefs.lzs      
2007-08-31 14:23:13 UTC (rev 6299)
@@ -73,14 +73,19 @@
   * @access private
   */
 function LzInheritedHash (parent)  {
-  var constructor = arguments.callee
-  if (! parent) {
-    this.constructor = constructor;
-  } else {
+  if (parent) {
+    // NOTE: [2007-08-31 ptw] AS2 does not allow returning an
+    // alternate object from a constructor, so we have to resort to
+    // platform-specific code to implement inheritance.
     if ($as2) {
       this.__proto__ = parent;
     } else {
-      function xtor() { this.constructor = constructor; };
+      // NOTE: [2007-08-30 ptw/hqm/max] We tried to set the
+      // constructor property for this object to LzInheritedHash for
+      // the debugger, but that does not work (in at least Firefox and
+      // Opera).  Apparently there is something we don't fully
+      // understand about the constructor property in Javascript.
+      function xtor() {};
       xtor.prototype = parent;
       return new xtor();
     }


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

Reply via email to