[TIMOB-18321] Windows: Updating UI property from timer causes crash
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | n/a |
| Reporter | Ingo Muschenetz |
| Assignee | Unknown |
| Created | 2015-01-06T20:50:03.000+0000 |
| Updated | 2018-02-28T19:55:18.000+0000 |
Description
Updating UI property (like Ti.UI.Button.title) from timer function causes crash inside HAL. Likely related to #30 and #47. Note that
Ti.API.info works in this case.
javascript
'use strict';
var win = Ti.UI.createWindow();
var view = Ti.UI.createView();
var btn = Ti.UI.createButton();
btn.title = 'Test';
btn.backgroundColor = 'blue';
view.add(btn);
win.add(view);
var count = 0;
var timerId = setInterval(function () {
Ti.API.info('TIMER ' + timerId + ': ' + count);
btn.title = 'TIMER ' + timerId + ': ' + count;
if (++count > 10) {
clearInterval(timerId);
}
}, 1000);
win.open();
No comments