Skip to first unread message

Milch Tüte

unread,
Mar 19, 2019, 5:57:34 AM3/19/19
to MIT App Inventor Forum

Hey, short question


What's wrong with the code?

The code is very simplified, I just transferred the necessary codes to a new project, but Error is identical, i hope so you can bedder help me. i am a bloody beginner, someone who has a bit skills will certainly find the problem quickly i think. A list is created with data, I want to be able to delete the data from the list. If the list is filled with numbers you can also delete them, but if the list is filled with different dates then the error (see picture) will appear when trying to delete the date from the list. But the error comes only when I try to delete the first or the last date.......................
if there
ie. stands
15.3
15.3 15.3 15.3
I can delte the both 15.3 in the middle, but not the first and last 15.3, when i try this then error
apinventor.png
apinventor2.png

ABG

unread,
Mar 19, 2019, 9:26:26 AM3/19/19
to MIT App Inventor Forum
Listpicker1 has Element "Loschen", but the
global list uhrzeit doesn't have that value,
so the index is zero.

You can't remove what you don't have.

Should "Loschen" be the Title of the ListPicker,
instead of an Element?

ABG

Milch Tüte

unread,
Mar 19, 2019, 9:45:19 AM3/19/19
to MIT App Inventor Forum
No
When the listpicker called then you can decide betwen "cancel" and "delete(löschen in german)", if you tick "delete", then the item shouold be remove of the list. This isnt the Problem.

TimAI2

unread,
Mar 19, 2019, 11:15:28 AM3/19/19
to MIT App Inventor Forum
Listview1.Selection is not in list global uhrZeit (because you convert it back in to a csv tabe)

Use Listview1.Elements and list global uhrZeit instead 

Milch Tüte

unread,
Mar 20, 2019, 1:14:26 PM3/20/19
to MIT App Inventor Forum

you mean i should change listview.selection to listview.elements? No, this does not solve the problem: C

TimAI2

unread,
Mar 20, 2019, 1:39:12 PM3/20/19
to MIT App Inventor Forum
No change Listview1.ElementsFromString to Listview1.Elements and just use global uhrZeit
Reply all
Reply to author
Forward
0 new messages