【问题标题】:MIT AppInventor list Error : Attempt to get item number 0, of the list [5]MIT AppInventor 列表错误:尝试获取列表 [5] 的第 0 项
【发布时间】:2021-02-14 19:38:54
【问题描述】:

" 选择列表项:尝试获取列表 [5] 中的第 0 项。有效的最小项编号为 1。 注意:您将不会在 5 秒内看到另一个错误报告。 "

大家好, 当应用程序打开应用程序没有崩溃时,顶部的消息会出现,但我需要在屏幕上的某个位置单击几次直到它消失..

这个想法是在 firebase.database 中搜索 var 'UID' 的值,当它找到它时,我需要获取 is Brother key 的值..

我希望你帮我清除这条消息我尝试了几种方法来获得结果,但还没有结果..

非常感谢帮助:)

When Screen Open.

This is how I tried to get the uid && employeeKey.

for your help me I set var 'UID' = to uid value of employee number 1

'UID' 从屏幕 1 上的 firebase.auth 表单中获取值..

【问题讨论】:

    标签: list firebase firebase-realtime-database foreach app-inventor


    【解决方案1】:

    列表中的索引 块返回 0,如果在列表中没有找到“事物”,在这种情况下,您试图从 empKey 列表中的第 0 项中获取值,这没有意义。

    因此你必须添加一个 if 语句...如果返回的索引为 0,则不要搜索 empKey。

    顺便说一句。提出此类问题的更好地方是MIT App Inventor 社区...

    【讨论】:

      猜你喜欢
      • 2016-01-30
      • 1970-01-01
      • 2016-05-24
      • 2022-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-21
      相关资源
      最近更新 更多