【问题标题】:tizen: Internal errortizen:内部错误
【发布时间】:2015-05-05 22:25:23
【问题描述】:

我正在尝试创建一个 tizen 网络应用程序来设置壁纸。编写代码后,我收到内部错误。没有语法错误。请帮忙。这是代码

//Initialize function

function setWallpaperSuccess(){
console.log("Wallpaper successfully set");
}

function setWallPaperError(error){
console.log("Failed to set wallpaper: " + error.message)
}

var init = function () {
$('div[data-role="page"]:first .ui-btn-back').bind("click", function(event) {
var currentApp = tizen.application.getCurrentApplication();
currentApp.exit();
});
// TODO:: Do your initialization job
console.log("init() called");

$( "#btnSetWallpaper" ).bind( "click", function(event, ui) {
try{
tizen.systemsetting.setProperty("LOCK_SCREEN", "SampleProject/images/image0.jpg", setWallpaperSuccess, setWallPaperError);
tizen.systemsetting.setProperty("HOME_SCREEN", "SampleProject/images/image0.jpg", setWallpaperSuccess, setWallPaperError);
}
catch (error){
console.log("Set wallpaper invokes exception: " + error.message);
}
});
};
$(document).bind('pageinit', init);

【问题讨论】:

    标签: tizen tizen-web-app


    【解决方案1】:

    您收到此错误的原因可能是您使用的 jquery 的版本低于 1.4.0,其中“pageinit”已被弃用。 相反,您可以使用“pagecreate”事件代替“pageinit”。

    https://api.jquerymobile.com/pageinit/

    【讨论】:

      猜你喜欢
      • 2016-12-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-18
      • 1970-01-01
      相关资源
      最近更新 更多