Skip to content

Commit e2d03ba

Browse files
author
Jelte Lagendijk
committed
Add logging
1 parent b3436a2 commit e2d03ba

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/HTMLSnippet/widget/HTMLSnippet.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ define([
1717
_objectChangeHandler: null,
1818

1919
postCreate: function() {
20+
logger.debug(this.id + ".postCreate");
2021
this._setupEvents();
2122

2223
if (!this.refreshOnContextChange) {
@@ -25,6 +26,7 @@ define([
2526
},
2627

2728
executeCode: function() {
29+
logger.debug(this.id + ".executeCode");
2830
var external = this.contentsPath !== "" ? true : false;
2931
switch (this.contenttype) {
3032
case "html":
@@ -76,6 +78,7 @@ define([
7678
},
7779

7880
update: function(obj, callback) {
81+
logger.debug(this.id + ".update");
7982
if (this.refreshOnContextChange) {
8083
this.executeCode();
8184

@@ -98,19 +101,21 @@ define([
98101
},
99102

100103
_setupEvents: function() {
104+
logger.debug(this.id + "._setupEvents");
101105
if (this.onclickmf) {
102106
this.connect(this.domNode, "click", this._executeMicroflow);
103107
}
104108
},
105109

106110
_executeMicroflow: function() {
111+
logger.debug(this.id + "._executeMicroflow");
107112
if (this.onclickmf) {
108113
mx.data.action({
109114
store: {
110115
caller: this.mxform
111116
},
112117
params: {
113-
actionname: this.onclickmf
118+
actionname: this.onclickmf,
114119
},
115120
callback: function() {
116121
// ok
@@ -123,6 +128,7 @@ define([
123128
},
124129

125130
evalJs: function() {
131+
logger.debug(this.id + ".evalJS");
126132
try {
127133
eval(this.contents + "\r\n//# sourceURL=" + this.id + ".js");
128134
} catch (e) {

test/Test.mpr

2 KB
Binary file not shown.

test/widgets/HTMLSnippet.mpk

42 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)