2014년 12월 11일 목요일

App Inventor Index too large?


I am working on an app that takes forms (that include text and signatures) and stores them in a tinydb, which then goes in to a mysql database. I have used this same technique for other forms and it has worked perfectly, but this one when I try to send it says this in the app, "Select list Item: List Index too large. Select list item: attempt to get item number to of a list of length 1: (1)
"Select list Item: List Index too large. Select list item: attempt to get item number to of a list of length 1: (1)"
I know my php code is right because it works with a HTML form. I have attached an image of my blocks, help would be much appreciated.

I know my php code is right because it works with a HTML form. I have attached an image of my blocks, help would be much appreciated.



--
Is it possible that you tried to select a list index that is larger than the number of items in your list?  You found the List block that can tell you how many items are in your block.  Using it with a local variable might be the issue.  When you change screens, that local variable is not necessarily passed between screens.

Your friend here is the Ai2 DoIt debugger.   It can help you find the issue.

--
try
set dbvaule to get item

also in the btnSubmit.Click event you probably like to use some other variables and not only "set global types = yes"?

--

댓글 없음:

댓글 쓰기