Skip to content

Commit 4853a5b

Browse files
author
Jelte Lagendijk
committed
Fix timer issue
1 parent 51cbad3 commit 4853a5b

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
test/Test.mpr.lock
1+
test/javasource/
2+
test/deployment/
3+
test/.classpath
4+
test/.project
5+
test/Test.mpr.lock
6+
*.mws
7+
*.launch
8+
*.tmp
9+
*.lock
10+
*.bak
11+
.idea/

src/MicroflowTimer/widget/MicroflowTimer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ require([
2424
_contextObj: null,
2525
_timer: null,
2626
_blocked : null,
27+
_timerStarted: false,
2728

2829
// dijit._WidgetBase.postCreate is called after constructing the widget. Implement to do extra setup work.
2930
postCreate: function () {
@@ -35,7 +36,9 @@ require([
3536
console.log(this.id + '.update');
3637

3738
this._contextObj = obj;
38-
this._runTimer();
39+
if (!this._timerStarted) {
40+
this._runTimer();
41+
}
3942

4043
callback();
4144
},
@@ -64,6 +67,7 @@ require([
6467
_runTimer: function () {
6568
console.log(this.id + '._runTimer', this.interval);
6669
if (this.microflow !== "" && this._contextObj) {
70+
this._timerStarted = true;
6771
if (this.once) {
6872
setTimeout(lang.hitch(this, this._execMf), this.interval);
6973
} else {

src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="MicroflowTimer" version="2.2" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="MicroflowTimer" version="2.2.1" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="MicroflowTimer/MicroflowTimer.xml"/>
66
</widgetFiles>

test/Test.mpr

-175 KB
Binary file not shown.

test/widgets/MicroflowTimer.mpk

53 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)