尝试让选择器{}显示在 SmartFace App Studio 中

Trying to get a picker{} to show in SmartFace App Studio

我一直在使用 SmartFace.io 中的示例代码按如下方式工作:

    pick(
    myCars,
    selectedIndex,
    function(e) {Pages.NewPage.Label1.text = myCars[e.index]; selectedIndex = e.index; },
    function() {},
    function() {}
 );

但是选择器不想在模拟器中显示。我也试过将这段代码放在一个单独的函数中,并从 ImageButton 的 OnPress 事件中调用它,但仍然没有。

我正在 iPhone 4S 上尝试这个,所以也许这就是问题所在...

任何关于我做错了什么的提示都将不胜感激。

谢谢 格里

我只是向 Page1 添加了一个 TextButton 和 Label 并编写了这些代码行。它有效;也许,其他一些代码破坏了功能。

var myCars = ["Audi", "Volvo", "Volkswagon"]; 
var selectedIndex = 0;

/**
* Creates action(s) that are run when the user press the key of the devices.
* @param {KeyCodeEventArguments} e Uses to for key code argument. It returns e.keyCode parameter.
* @this SMF.UI.Page
*/
function Page1_Self_OnKeyPress(e) {
    if (e.keyCode === 4) {
        Application.exit();
    }
}
/**
* Creates action(s) that are run when the page is appeared
* @param {EventArguments} e Returns some attributes about the specified functions
* @this SMF.UI.Page
*/
function Page1_Self_OnShow() {
    //Comment following block for removing navigationbar/actionbar sample
    //Copy this code block to every page onShow
    header.init(this);
    header.setTitle("Page1");
    header.setRightItem("RItem");
    header.setLeftItem();
    /**/
}
/**
* Creates action(s) that are run when the object is pressed from device's screen.
* @param {EventArguments} e Returns some attributes about the specified functions
* @this SMF.UI.TextButton
*/
function Page1_TextButton1_OnPressed(e){
      pick(
    myCars,
    selectedIndex,
    function(e) {Pages.NewPage.Label1.text = myCars[e.index]; selectedIndex = e.index; },
    function() {},
    function() {}
 );
}