I want to use busy plugin in web client, but I can't
I have this method attached to a button:
- Code: Select all
function __btnBusy()
{
plugins.busy.prepare();
var params = {
processFunction: _pruebaBusy,
processArgs: null,
message: 'Please wait...',
showCancelButton: true,
cancelButtonText: 'Cancel'
};
plugins.busy.block(params);
}
The process function is only for test purposes:
- Code: Select all
function _pruebaBusy()
{
application.updateUI();
try {
for(var i = 1; i <= 1000; i++) {
application.sleep(3000);
if(plugins.busy.isCanceled()) {
break;
}
}
} catch (e) {
application.output(e);
} finally {
plugins.busy.unblock();
application.updateUI();
}
}
When I click on the button, nothing happens (and no error message is sent to console). What's wrong?