[NOT Fixed] Issue Storing A List's Elements with TinyDB

I’m not sure if this is an issue in my code or with MIT App Inventor but it has happened with two of my projects. I’ve been having an issue storing the elements of the ListView component using tinydb. Here are some images of the code: Screen Shot 2020-03-26 at 6.22.59 AM

(I had a variable called “comments”) For more context, it is a checklist type of app, the user clicks the event from the events list and clicks the comment button to add comments. The name of the tag would be the name of the event + “comments”. It would store the list’s elements and later set the elements to what was stored. When the user clicks on one of their comments, it would delete it. More specifically about the issue, when the app would be refreshed, the list would show its elements but when it would be clicked on, it would give an error saying it cannot remove the item from the list because the list was empty.

Sorry, the bug was actually not fixed.

Post your exported .aia file?

Tricky.

I have a hunch (usually wrong!) that the problem is related to how you are naming the TinyDb Tags. To check that they are as expected, use “call TinyDB . GetTags” and populate a temporary label.

1 Like

I did try that, and it was storing the tags correctly.

use Do it to debug your blocks, see also tip 4 here https://puravidaapps.com/learn.php
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

I checked the blocks a few times, but it was doing what it was supposed to do.

On my website I have a number of list handling snippets. See the snippet about deleting from Lists.
https://www.professorcad.co.uk/appinventorsnippets#DelListViewItems