Skip to first unread message

ivano becattini

unread,
Feb 13, 2015, 5:23:45 PM2/13/15
to mitappinv...@googlegroups.com
Hello everyone

I am a new user in this App Inventor and I am aproaching to this new way to develop APP. Let's get to my problem. I am trying to make a "to-do list" program. I put a:

- ListView
- A textbox
- 1 buttonAdd to add the text I typed
- 1 buttonEmpty to empy all the list
- 1 TinyDB.

Every time I enter a entry then I press the buttonAdd and  I store that value into the database and I add a new voice into the listView: this works
Every time I press the buttonEmpty to empty the database AND to empty my Listview, the DB empties but the listView doesnt!

I can see the values in front of my eyes but ... If I insert a new value (and tha'ts why I am sure DB is empty) instead of viewing all the entries in the ListView I can only see the last one. This means the DB has been empty and it's ok but I'd like that my ListView goes empty too.
How can I do that?
My code does the following:
I call ButtonEmpty > I empy the TinyDB -> I use a for each item in my list -> Remove list item "my list" with index a variabile "i" which goes to 1 through the end of the list.

Can someone help me please?

Ghica

unread,
Feb 14, 2015, 11:57:31 AM2/14/15
to mitappinv...@googlegroups.com
What about:
  set ListView1.Elements to create empty list ?
Cheers, Ghica.

ivano becattini

unread,
Feb 15, 2015, 4:42:21 PM2/15/15
to mitappinv...@googlegroups.com
Yes Ghica you were right!

Thanks
Reply all
Reply to author
Forward
0 new messages