code.org - 如何在 code.org 中显示数据集中的文本?
问题描述
我正在开发一款龙与地下城应用程序,该应用程序最终将显示来自 D&D 书籍的信息。所以我试图从数据集中显示拼写信息。我尝试使用 readRecords 和 updateScreen 并在屏幕上显示“未定义”
我非常感谢任何有用的提示。 https://studio.code.org/projects/applab/VKNZ6xoJsy1ahETdh4R23_-Fs-JI3aF714hsoJqi3qg
解决方案
您需要updateScreen(spellOptions, spellTime);
从第 87 行移动到第readRecords()
84 行的块中。您还需要设置spellTime
为records[0].time
.
下面是第 84 到 87 行的代码:
readRecords("Spells", {name: spellOptions}, function(records) {
spellTime = records[0].spellTime;
updateScreen(spellOptions, spellTime);
});
推荐阅读
- sql - 如何使用触发器将插入的值与现有值进行比较和更新?
- python-3.x - 填充系列 1m 频率跳过周末
- php - 具有不同属性的jQuery切换并应用ajax
- java - AirMap 找不到导入
- c++ - 如何在 R 加载表中注册 C 符号?
- c# - 操作 System.Drawing.Image 并使用相同的 ImageFormat 保存
- php - 如果从 php 中的数据库中获取数据,则查看数据使用情况
- javascript - 向下滚动时无限滚动不起作用
- spring - 在 Hibernate 中使用 GeneratedValue 和 GenericGenerator 自定义注释
- azure - 有没有办法在 YML 中使用 Azure Artifacts 触发管道?