[Laszlo-checkins] r11343 - in openlaszlo/trunk: WEB-INF/lps/lfc/compiler lps/components/debugger/platform/swf9

hqm@openlaszlo.org hqm at openlaszlo.org
Fri Oct 3 12:53:11 PDT 2008


Author: hqm
Date: 2008-10-03 12:53:08 -0700 (Fri, 03 Oct 2008)
New Revision: 11343

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
   openlaszlo/trunk/lps/components/debugger/platform/swf9/eval.lzs
Log:
Change 20081003-hqm-K by hqm at badtzmaru.home on 2008-10-03 15:50:37 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: fix for solo swf9 debugger window startup

New Features:

Bugs Fixed: LPP-7117

Technical Reviewer: pbromanik
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

needed to more carefully update the call to the loader 

Tests:



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs	2008-10-03 18:57:20 UTC (rev 11342)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzRuntime.lzs	2008-10-03 19:53:08 UTC (rev 11343)
@@ -101,5 +101,5 @@
   }
   // TODO: [2008-09-16 ptw] This does not work for built-in classes in
   // swf9 :(
-  return this[name];
+  return this[name] || global[name];
 }

Modified: openlaszlo/trunk/lps/components/debugger/platform/swf9/eval.lzs
===================================================================
--- openlaszlo/trunk/lps/components/debugger/platform/swf9/eval.lzs	2008-10-03 18:57:20 UTC (rev 11342)
+++ openlaszlo/trunk/lps/components/debugger/platform/swf9/eval.lzs	2008-10-03 19:53:08 UTC (rev 11343)
@@ -35,23 +35,30 @@
         e.target.loader.unload();
     }
 
+    private function configureProbeListeners(dispatcher:IEventDispatcher):void {
+        dispatcher.addEventListener(Event.COMPLETE, checkServerResponseHandler);
+        dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, checkServerResponseHandler);
+        dispatcher.addEventListener(IOErrorEvent.IO_ERROR, checkServerResponseHandler);
+    }
+
     public function checkServerResponse () {
-        var loadobj = new Loader();
-        loadobj.contentLoaderInfo.addEventListener(Event.INIT, checkServerResponseHandler);
-        var reqstr =  lz.Browser.toAbsoluteURL( "__dbgprobe.lzx?lzt=stat", false );
-        this.loader.load(new URLRequest(reqstr),
-                         new LoaderContext(false,
-                                           new ApplicationDomain(ApplicationDomain.currentDomain)));
+        var probe = new URLLoader();
+        configureProbeListeners(probe);
+        var reqstr = "__dbgprobe__.lzx?lzt=stat";
+        probe.load(new URLRequest(reqstr));
     }
 
-
-    public function checkServerResponseHandler (src) {
+    public function checkServerResponseHandler (event:Event) {
+        var data = ((URLLoader)(event.target)).data;
       // NB: This is a callback handler, and 'this' will be bound to some LoadVars object, not to Debug
-      if (src == undefined) {
-        Debug.warn('Debugger cannot contact LPS server, switching to SOLO mode.');
-        Debug.setAttribute('solo_mode', true);
+      if (data == null) {
+          Debug.warn('Debugger cannot contact LPS server, switching to SOLO mode.');
+          if (Debug.console is LzDebuggerWindowConsoleBridge) {
+              Debug.console.window.setAttribute('solo_mode', true);
+          }
       }
     }
+    
 
     public function addTextLinkCallback(lztext:LzText) {
         var textfield:TextField = (lztext.sprite cast LzTextSprite).textfield;



More information about the Laszlo-checkins mailing list