Using AI 2, I'm attempting to pull in a large amount of data from a Fusion Table. I have 30 items per row in this database.
I've been getting an error stating that my "List index too large" and that I can't insert an item into the list because the maximum valid item number is 10.
However, on a different part of my app, where I'm only pulling in about five or six of the 30 things, I get the same error message round 17 that says 17 is the maximum valid item number.
Any suggestions?
--
--
It sounds like a problem in your code. Easy to test; make a list with say 30 items and print it in a label. If that works, the problem is in your code.
--
--
Sorry, I responded by email instead of on here. The main reason I think its a separate issue is that it defines where I've had too many items in my list at different spots depending upon how much I'm pulling.
For one part of my app, I'm pulling 29 pieces of data per row. It says 10 is too many, so that's somewhere over 290 items in that csv list that it thinks is too many.
For another part of my app, I'm pulling 7 pieces of data per row. That one says that 18 is too many, which is only 119 items in that csv list.
Also, unless I'm forgetting something, I'm not sure of any ability to code the size of a list where it could be a code or syntax error. I've gotten my fair share of grabbing items not in the list, or at the wrong place, or what not because I've done that wrong, and I've been able to troubleshoot that... But this is a new error that just says my index is too large.
--
You get that error when reading from the list or inserting to it?
--
--
I'm reading from the Fusion DB which is populating a CSV list from the results in the DB. That's when I get the error. Attached are my call to the DB for information and then the loading of it into the array:
--
what happens, if you use this select statement instead?
SELECT * FROM <tableid>
--
So i found oddly, that there is a code problem, although it's not what you might expect.
Whenever I hit the "Back" button that takes me to my main screen, I had assumed that when I opened the main screen, the previous screen would close, but it does not. So then when I go back to do anything the previous instance that is still open seems to be interfering with the other instance.
But there is also a bit more of a problem to this in that on my phone, which is an HTV EVO 4G LTE from sprint, running what I think is Android 4.2 (maybe 4.3), if you use the exit button from the Menu, the app dispapears as if its closed, but when I use the page through open app buttons, it didn't actually close, and stays open on the prompt to close the app.
Anyway, at least until just now I had not had any problems with data populating. I was moving data from one list to another, which I stopped doing and it resolved the issue. But I can't seem to fix the app not closing thing from the regular exit menu. Is this a known bug?
--
Whenever I hit the "Back" button that takes me to my main screen,
use the close screen block instead of reopening the already opened main screen
more see here Manager Screen Demonstration
But there is also a bit more of a problem to this in that on my phone, which is an HTV EVO 4G LTE from sprint, running what I think is Android 4.2 (maybe 4.3), if you use the exit button from the Menu, the app dispapears as if its closed, but when I use the page through open app buttons, it didn't actually close, and stays open on the prompt to close the app.
to exit the app, use the close application block
--
You do not appear to be exceeding the number of items in a list. What is the limit of tags..items in any list? See this: discussion https://groups.google.com/forum/#!topic/appinventor/O3LSt3QrGXA It indicates you should be able to handle several thousand tags or so. With the size of your files, you should have no issues, so you probably have something errant in the code.
A possible issue/limitation on the list size could be exceeding the app size of 5Mb, if all the list items are saved in the app. However, several thousand tags are possible and probably more. If you use a TinyDB component, the limit is the size of the database is 2mB; not the number of items but the total bits attributed to the text of the items in the DB stored.
Another possibility, is amount of memory in your phone. However, the error messages point to a coding misstep in your case.
--
댓글 없음:
댓글 쓰기