2013-08-29 35 views
0

我已經測試WL.BusyIndi​​cator像下面的代碼:IBM工作燈6.0 - 無法更改默認WL.BusyIndi​​cator文本

busyIndicator = new WL.BusyIndicator('content', { 
    text : 'saving' 
}); 
busyIndicator.show(); 
setTimeout(function() { 
    busyIndicator.hide(); 
}, 3000); 

信息中心說BusyIndicator options can get 'text' in Android environment

我可以看到我的Android模擬器(V4.0.4/V4.1.2/v4.2.2)所示的BusyIndi​​cator控件,但文字是默認的「正在載入」 ......

注:在iOS中一樣發生,因爲好。

我的工作燈Studio版本是:6.0.0.201307241843

回答

3

試試下面的代碼:強似對象與text關鍵

function wlCommonInit(){ 

    WL.ClientMessages.loading = "Hello world :)"; 

    var busyInd = new WL.BusyIndicator('content'); 
    busyInd.show(); 

    setTimeout(function() { 
     busyInd.hide(); 
    }, 3000); 
} 

請注意,我用WL.ClientMessages.loading設置郵件,到構造函數。

我不得不看忙碌指標代碼找出錯誤,我會打開一個缺陷。感謝您報告這一點。

+0

偉大的這是我的工作..但任何想法爲什麼文本鍵構造函數不工作??? –

+0

在顯示忙指示符的Cordova插件被調用之前,傳遞的鍵/值對將被WL.ClientMessages.loading覆蓋。 – cnandreu

+0

好的,謝謝cnandreu。那麼,如果我想在項目的不同部分使用不同的繁忙指示符,那麼我是否每次都需要覆蓋文本?或有沒有辦法用不同的文本創建多個忙指標對象? –