[Laszlo-checkins] r14118 - in openlaszlo/trunk: WEB-INF/lps/lfc/compiler WEB-INF/lps/lfc/debugger lps/components/debugger
ptw@openlaszlo.org
ptw at openlaszlo.org
Thu Jun 11 10:08:05 PDT 2009
Author: ptw
Date: 2009-06-11 10:08:01 -0700 (Thu, 11 Jun 2009)
New Revision: 14118
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzDebug.lzs
openlaszlo/trunk/lps/components/debugger/debugger.lzx
Log:
Change 20090610-ptw-u by ptw at dueling-banjos.home on 2009-06-10 17:22:18 EDT
in /Users/ptw/OpenLaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Be more careful with Debug.environment and eval
Bugs Fixed: LPP-8263 DHTML debugger "_" is always null
Technical Reviewer: hminsky (Message-ID: <8c61fad60906111000x1304ccemd215bbe1c7d2d75d at mail.gmail.com>)
Details:
LzDebug, LzBootstrapDebugService: Move environment to bootstrap.
LzBootstrapDebugService: For future compatibility, also try
Debug.environment in evalSimpleExpr.
debugger: Don't define global._ which will mask
Debug.environement._ Remove redundant RegExp's
Tests:
lzx> 1+1
2
lzx> _
2
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs 2009-06-11 14:03:25 UTC (rev 14117)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs 2009-06-11 17:08:01 UTC (rev 14118)
@@ -124,7 +124,7 @@
/** @access private */
function evalSimpleExpr(expr:String) {
var parts = expr.match(this.ElementPattern);
- var val = globalValue(parts[0]);
+ var val = globalValue(parts[0]) || Debug.environment[parts[0]];
for (var i = 1, l = parts.length; i < l; i++) {
val = val[parts[i]];
}
@@ -329,6 +329,11 @@
/** @access private */
var window:*;
+ /** Any amendments to the environment for debug evaluator, initially
+ * just _, __, and ___. Could put things like write, format, inspect.
+ * @access private
+ */
+ var environment = {};
/** @access private */
function LzBootstrapDebugService (logger:LzBootstrapDebugLogger=null,
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzDebug.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzDebug.lzs 2009-06-11 14:03:25 UTC (rev 14117)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzDebug.lzs 2009-06-11 17:08:01 UTC (rev 14118)
@@ -221,12 +221,6 @@
*/
var showInternalProperties:Boolean = false;
- /** Any amendments to the environment for debug evaluator, initially
- * just _, __, and ___. Could put things like write, format, inspect.
- * @access private
- */
- var environment = {};
-
/**
* Output state
* @access private
Modified: openlaszlo/trunk/lps/components/debugger/debugger.lzx
===================================================================
--- openlaszlo/trunk/lps/components/debugger/debugger.lzx 2009-06-11 14:03:25 UTC (rev 14117)
+++ openlaszlo/trunk/lps/components/debugger/debugger.lzx 2009-06-11 17:08:01 UTC (rev 14118)
@@ -220,7 +220,6 @@
<method name="initEvalView">
<![CDATA[
- global._ = null;
if ($dhtml) {
} else {
this.evalloader = new LzDebugEvalLoader(this);
@@ -314,12 +313,6 @@
]]>
</method>
- <!-- Simple "path" expressions will only have symbols, `.`, or `[numbers]` -->
- <!-- @keywords private readonly -->
- <attribute name="SimpleExprPattern" value="$once{new RegExp('^\\s*([$_A-Za-z][$\\w]*)((\\s*\\.\\s*[$_A-Za-z][$\\w]*)|(\\s*\\[\\s*\\d+\\s*\\]))*\\s*$')}" />
- <!-- Now pull out just the element 'selectors', so you can walk down them -->
- <!-- @keywords private readonly -->
- <attribute name="ElementPattern" value="$once{new RegExp('([$_A-Za-z][$\\w]*)|(\\d+)', 'g')}" />
<!-- send the input text field to server for compile/eval -->
<method name="doEval">
<![CDATA[
More information about the Laszlo-checkins
mailing list