[Laszlo-checkins] r10262 - in openlaszlo/trunk: WEB-INF/lps/lfc/compiler WEB-INF/lps/lfc/core WEB-INF/lps/server/src/org/openlaszlo/compiler WEB-INF/lps/server/src/org/openlaszlo/sc lps/components/debugger

hqm@openlaszlo.org hqm at openlaszlo.org
Tue Jul 8 13:33:30 PDT 2008


Author: hqm
Date: 2008-07-08 13:33:25 -0700 (Tue, 08 Jul 2008)
New Revision: 10262

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDefs.lzs
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
   openlaszlo/trunk/lps/components/debugger/library.lzx
Log:
Change 20080708-hqm-m by hqm at badtzmaru.home on 2008-07-08 15:40:44 EDT
    in /Users/hqm/openlaszlo/trunk4
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  allow 'debug=true' to work for swf9

New Features:

Bugs Fixed:

Technical Reviewer: ptw
QA Reviewer: pbr
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
    
+ tell compiler to basically ignore 'debug=true' for swf9 compilation

+ move declarations 
  lz.DeclaredEventClass = LzDeclaredEventClass; 
  lz.Formatter = LzFormatter;  
to occur after the lz object is initialized

+ This also means that you can run fdb attached to a browser, e.g., 

fdb "http://127.0.0.1:8080/trunk4/demos/weather/weather.lzx?lzt=swf&lzr=swf9"

Tests:

weather compiles in swf9, compiles and runs with debug=true flag

run fdb on a swf9 app URL as shown



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs	2008-07-08 19:44:22 UTC (rev 10261)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzFormatter.lzs	2008-07-08 20:33:25 UTC (rev 10262)
@@ -472,5 +472,5 @@
   }
 
 };
-lz.Formatter = LzFormatter;  // publish
 
+

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDefs.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDefs.lzs	2008-07-08 19:44:22 UTC (rev 10261)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzDefs.lzs	2008-07-08 20:33:25 UTC (rev 10262)
@@ -77,7 +77,6 @@
     return "LzDeclaredEvent";
   }
 }
-lz.DeclaredEventClass = LzDeclaredEventClass;  // publish
 
 /**
  * The initial value for an event.  Automatically replaced with an
@@ -256,3 +255,5 @@
     }
   })());
 
+lz.DeclaredEventClass = LzDeclaredEventClass;  // publish
+lz.Formatter = LzFormatter;  // publish

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java	2008-07-08 19:44:22 UTC (rev 10261)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java	2008-07-08 20:33:25 UTC (rev 10262)
@@ -735,7 +735,7 @@
         }
 
         // Add file/line information if debugging
-        if (debug) {
+        if (debug && !("swf9".equals(env.getRuntime()))) {
           // File/line stored separately for string sharing
           String name = "_dbg_filename";
           String filename = Parser.getSourceMessagePathname(element);

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java	2008-07-08 19:44:22 UTC (rev 10261)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java	2008-07-08 20:33:25 UTC (rev 10262)
@@ -368,7 +368,7 @@
 
         // Bring up a debug window if needed.
         if (debug && makedebugwindow) {
-            addScript("__LzDebug.makeDebugWindow()");
+            //addScript("__LzDebug.makeDebugWindow()");
         }
 
 

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java	2008-07-08 19:44:22 UTC (rev 10261)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java	2008-07-08 20:33:25 UTC (rev 10262)
@@ -263,6 +263,11 @@
   // Set internal flags that depend on external flags
   public void defaultOptions() {
 
+    // Disable debug compilation for swf9
+    if ("swf9".equals((String)options.get(RUNTIME))) {
+      options.putBoolean(DEBUG, false);
+    }
+
     // TODO: [2008-05-18 dda] It may be possible to clean this up
     // a little now that we know this is only called once.
 

Modified: openlaszlo/trunk/lps/components/debugger/library.lzx
===================================================================
--- openlaszlo/trunk/lps/components/debugger/library.lzx	2008-07-08 19:44:22 UTC (rev 10261)
+++ openlaszlo/trunk/lps/components/debugger/library.lzx	2008-07-08 20:33:25 UTC (rev 10262)
@@ -7,6 +7,9 @@
     <when runtime="dhtml">
       <!-- no debug window in DHTML, it is in its own iframe -->
     </when>
+    <when runtime="swf9">
+      <!-- swf9 debugger uses fdb for now -->
+    </when>
     <otherwise>
       <include href="debugger.lzx"/>
     </otherwise>
@@ -14,6 +17,6 @@
 </library>
 
 <!-- * 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