如果我进入菜单,然后再进入菜单,这个Simple JS代码似乎会导致我的Pebble App崩溃并出现此错误。有人能告诉我为什么会这样吗?谢谢!
用作PNG位图的图像 - http://imgur.com/iDlZxJY
[ERROR] ault_handling.c:93:应用程序错误! {0a21d6a3-cff2-43f5-bfe8-82b3a381d8fe} PC:0x5555aaaa LR:0x809e8c9
var UI = require('ui');
var Vector2 = require('vector2');
var main = new UI.Window({
});
var playerBattleAnimation = new UI.Image({
// Horizontal, Vertical
position: new Vector2(35, 100),
size: new Vector2(35 , 35),
image: 'images/standingattack1'
});
main.add(playerBattleAnimation);
main.show();
main.on('click', 'up', function(e) {
var menu = new UI.Menu({
sections: [{
items: [{
title: 'Pebble.js',
icon: 'images/menu_icon.png',
subtitle: 'Can do Menus'
}, {
title: 'Second Item',
subtitle: 'Subtitle Text'
}, {
title: 'Third Item',
}, {
title: 'Fourth Item',
}]
}]
});
menu.on('select', function(e) {
console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex);
console.log('The item is titled "' + e.item.title + '"');
});
menu.show();
});