[Laszlo-checkins] r16556 - openlaszlo/trunk/WEB-INF/lps/lfc/services
bargull@openlaszlo.org
bargull at openlaszlo.org
Tue Jun 1 10:26:42 PDT 2010
Author: bargull
Date: 2010-06-01 10:26:40 -0700 (Tue, 01 Jun 2010)
New Revision: 16556
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs
Log:
Change 20100531-bargull-TKS by bargull at Bargull02 on 2010-05-31 01:21:49
in /home/anba/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: null pointer exception in lz.ModeManager for debug apps
New Features:
Bugs Fixed: LPP-9053 (npe in lz.ModeManager.handleMouseEvent() in debug mode)
Technical Reviewer: hqm
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Overview:
Details:
There was a missing test in an if-condition which led to a null pointer exception. While fixing this, I've restructured the code a bit:
The test whether a view is a child of the debugger window can be done before entering the loop. If the view is a child of the debugger, simply don't enter the loop, but still send the mouse event. Otherwise just proceed like before.
Tests:
see bugreport
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs 2010-06-01 14:21:36 UTC (rev 16555)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzModeManager.lzs 2010-06-01 17:26:40 UTC (rev 16556)
@@ -167,6 +167,13 @@
}
var dosend:Boolean = true;
+ if ($debug) {
+ // exclude the debugger from the mode
+ var isDebugView:Boolean = Debug.canvasConsoleWindow && view && view.childOf(Debug.canvasConsoleWindow);
+ // the loop's test expression checks dosend, by setting it to
+ // false we won't enter the loop for the debugger altogether
+ dosend = ! isDebugView;
+ }
for (var i:int = this.modeArray.length - 1; dosend && i >= 0; --i) {
var mView:LzView = this.modeArray[ i ];
if (! mView) {
@@ -174,12 +181,6 @@
// can have side-effects, e.g. modeArray may change (LPP-7681)
continue;
}
- // exclude the debugger from the mode
- if ($debug) {
- if (Debug.canvasConsoleWindow && view.childOf(Debug.canvasConsoleWindow)) {
- break;
- }
- }
if (view && view.childOf( mView )) {
break;
@@ -193,6 +194,10 @@
return;
}
+ if ($debug) {
+ // always send event for debugger
+ dosend = dosend || isDebugView;
+ }
if (dosend) {
//check for double-click
if (eventStr == "onclick") {
More information about the Laszlo-checkins
mailing list