-
• #2
@GRikell the problem is not let/const. So far I broke down the issue to a specific commit in the layout library itself by @Gordon.
The issue was introduced here https://github.com/espruino/BangleApps/commit/43a3d70571d35896a24fb1364e9fb0f066391807
It tries to use a physical button 2 for this example instead of a virtual one. The BangleJS2 only has one physical button.
Reverting that commit it is using correctly virtual buttons on the BangleJs2
-
• #3
Ok, thanks a lot.
So we have to wait for Gordon to fix this commit.
Actually, it is not just for the sample, but it also broke "Interval Timer". -
• #4
Ok, thanks - it looks like I just got one line in the wrong place: https://github.com/espruino/BangleApps/commit/6ad485c6287f15fb1f00f01859d2542e7677f50f
Now fixed I hope (in the development app loader) but please let me know!
-
• #5
Hi Gordon,
unfortunately Interval Timer app still crashes (blank screen) and the following appears on the web IDEUncaught ReferenceError: "a" is not defined at line 1 col 787 in intervalTimer.app.js ...1,h.width=32,h.r=1,h))}]},a&&a.push.apply(a,this._l.c[1].c);this.se... ^ in function "Layout" called from line 63 col 355 in intervalTimer.app.js ...{decrementActiveTime();}}]});menuLayout.render();const incrementA... ^ in function "setActiveTime" called from line 77 col 50 in intervalTimer.app.js }Bangle.setUI();timerMode='active';setActiveTime(); ^ in function "setup" called from line 77 col 81 in intervalTimer.app.js ...angle.setLCDPower(1);setup(); ^ >
Running in the emulator and disabling minified module uploads, this is the message:
>Uncaught Error: Cannot read property 'bind' of undefined at line 1 col 709 ....btnWatches.push(setWatch(a.bind(this,0),BTN1,{repeat:!0,edg... ^ in function "setUI" called from line 1 col 916 ...this._l.c[1].c)}this.setUI();var e=this;d(this._l),this.upda... ^ in function "Layout" called from line 16 col 5 ]}); ^ in function "setActiveTime" called from line 8 col 17 setActiveTime(); ^ in function "setup" called from line 1 col 7 setup();
Thanks!
g -
• #6
Ok, thanks - so it looks like this is another separate issue due to the minification (it works fine with the unminified Layout). I'm looking into it now
-
• #7
Ok, fixed!
-
• #8
Yes!
Thanks a lot (my trainings will improve for sure)
Hi Al,
it seems that the Layout module has a problem, perhaps related to new handling of let/const of v14 firmware.
When rendering on a Bangle2 a layout with more than one button, the following message is diplayed:
This happens even running the sample code available in the tutorial, e.g.:
I'm pretty sure that it worked on v13.
g-