我使用WL.BusyIndicator與工作燈6.0適配器電話:IBM工作燈6.0 - 忙指示燈不總是密切在Android
this.busyIndicator.show();
WL.Client.invokeProcedure(invocationData, {
onSuccess : function(response) {
this.busyIndicator.hide();
// do good stuff
}.bind(this),
onFailure : function(err) {
this.busyIndicator.hide();
WL.SimpleDialog.show("Adapter Error", JSON.stringify(err), [{text: "OK"}]);
}.bind(this)
});
這通常工作,但在Android上,當適配器調用失敗(工作燈服務器停止)我有時會看到「適配器錯誤」對話框,當我解僱它時,busyindicator仍然存在。此時我的應用程序已經死機,因爲busyindicator運行時我無能爲力。 (後退按鈕並不會清除)
沒有什麼在logcat中除了有關適配器調用失敗的錯誤消息。
我已經看到在Android 4.1.2和4.2.2的仿真器和4.1.2的手機上。我無法在Android 2.2仿真器中重現它,但運行速度非常緩慢,可能只是一個我無法在那裏實現的時間窗口。我還沒有看到iOS或Chrome中的問題。
有沒有其他人看到過這個?
這僅僅是一個片段。這段代碼運行在一個類中,我有一個busyindicator,我在創建類時初始化(這不會發生,直到wlCommonInit觸發,所以它都是好的)'this'總是指向類(注意我綁定了'this 'for all callbacks),所以this.busyIndicator是我設置的忙指示符的有效參考。這段代碼大部分時間都工作正常,this.busyIndicator.show()永遠不會失敗。這只是對this.busyindicator.hide()的調用,它會在android上間歇性地失敗。 –