0
WebOS 3.0の関数:onCompleteからenyo Uiコンポーネントにアクセスできません。WebOS 3.0関数からのUIへのアクセス
buttonTapped: function(inSender, inEvent) {
console.log("Button is clicked");
this.$.txt.setContent(inSender.name + " tapped."); // This worked
var request = webOS.service.request("luna://com.webos.service.tv.systemproperty", {
method: "getSystemInfo",
parameters: {"keys": ["modelName", "firmwareVersion", "UHD", "sdkVersion"]},
onComplete: function (inResponse) {
var isSucceeded = inResponse.returnValue;
if (isSucceeded){
console.log("Result: " + JSON.stringify(inResponse));
$.txt.setContent("Result: "+JSON.stringify(inResponse)); // This is not worked
}
}
});
...
コンソール出力
Button clicked Result{"modelName":"WEBOS1","firmwareVersion":"03.00.00","UHD":"false","sdkVersion":"03.00.00","returnValue":true} Uncaught TypeError: Cannot read property 'txt' of undefined
私はこれについての文書が見つかりません。