gpt4 book ai didi

titanium - message = "' undefined' 不是一个函数(评估 'bookview.open()' )”在钛

转载 作者:行者123 更新时间:2023-12-04 23:01:02 25 4
gpt4 key购买 nike

我是 TitaniumMobile 的新手,目前正在关注官方 tutorials但我在做这个阶段时感到很震惊

function showBook(event) {
var selectedBook = event.source;var args = {
title: selectedBook.title,
author: selectedBook.author
};
var bookview = Alloy.createController("bookdetails", args).getView();
bookview.open();
}

当我尝试使用 ios 模拟器运行时,我有点卡在上面的阶段,并出现以下错误。
  Script Error {
[ERROR] : backtrace = "#0 () at :0";
[ERROR] : line = 27;
[ERROR] : message = "'undefined' is not a function (evaluating 'bookview.open()')";
[ERROR] : name = TypeError;
[ERROR] : sourceId = 344963552;
[ERROR] : sourceURL = "file:///Users/hivelocity/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/6B8062FB-B379-407A-8553-184EED274850/FaveBooks.app/alloy/controllers/index.js";
[ERROR] : }

最佳答案

确保 bookdetails 是一个窗口而不是一个 View 。

要检查,只需打开 bookdetails.xml 并检查 Window 的标签是否存在。

关于titanium - message = "' undefined' 不是一个函数(评估 'bookview.open()' )”在钛,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24528983/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com