Author: ptw
Date: 2007-12-05 04:33:26 -0800 (Wed, 05 Dec 2007)
New Revision: 7449
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMonitor.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzTrace.lzs
Log:
Change 20071205-ptw-s by [EMAIL PROTECTED] on 2007-12-05 07:30:31 EST
in /Users/ptw/OpenLaszlo/ringding-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Tracing cleanup
Details:
Make tracing play correctly with class system
Tests:
Inspection
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMonitor.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMonitor.lzs 2007-12-05
04:23:05 UTC (rev 7448)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzMonitor.lzs 2007-12-05
12:33:26 UTC (rev 7449)
@@ -26,7 +26,7 @@
LzMonitor.format = LzSourceMessage.format;
LzMonitor.prototype.type = 'MONITOR';
// Same color as Debug.debug
-LzTrace.prototype.color = '#00cc00';
+LzMonitor.prototype.color = '#00cc00';
/**
* Create a monitor message from a format string
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzTrace.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzTrace.lzs 2007-12-05
04:23:05 UTC (rev 7448)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/debugger/LzTrace.lzs 2007-12-05
12:33:26 UTC (rev 7449)
@@ -79,7 +79,7 @@
return r;
};
m._dbg_previous_definition = f;
- who[what] = m;
+ who.addProperty(what, m);
} else {
Debug.error('%w.%s is not a function', who, what);
}
@@ -98,8 +98,15 @@
if (who[what] instanceof Function) {
var f = who[what];
var p = f['_dbg_previous_definition'];
- if (p) {
- who[what] = p;
+ if (p) {
+ // Try just removing trace
+ if (who.hasOwnProperty(what)) {
+ delete who[what];
+ }
+ // If that didn't work, apply previous
+ if (who[what] !== p) {
+ who.addProperty(what, p);
+ }
} else {
Debug.error('%w.%s is not being traced', who, what);
}
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins