List of pairs to dict: the list ["09"] is not a well-formed list of pairs

Could someone please assist me set up my code? In my listview, I was attempting to create a delete button that would allow me to remove a certain list. I can't get my delete button to operate. Error is always displayed

Show the error message?

List of pairs to dict: the list ["09"] is not a well-formed list of pairs.

You have several errors.

The global variable ClassList is not a list.
It is a dictionary with student IDs as keys and student names as values, right?
So it should not have the word List in its name to fool the programmer.
I would rename it to StudentNamesDict in the global init.
Do not use list blocks on a dictionary.

The Delete button has its logic backwards, and needs to be split into two events.

  1. The Delete button Click event should
    a. Check if the SelectionIndex > 0 to avoid a crash if nothing was selected yet
    b. Ask if the user is sure about deleting (use the words Delete and Cancel to make the Notifier event bulletproof)
    c. exit and leave the actual deleting work to the Notifier event that catches the button text (Delete or Cancel)
  2. The Notifier event that catches the choice should
    a. check if the Delete choice was taken, else just exit
    b. Do a Dictionary removal block (look it up) on dictionary StudentNamesDict at key ListView1.Selection
    c. Update TinyDb with StudentNamesDict, same place you loaded it from at startup.