How do I make all the text changing after I edit the name : Mit App Inventor?

Hi, I need help. I have already created the UI to edit the text.

image

image

My problem here is that after I edit the name, the name in the variable TeacherList does not automatically change

I hope to get some help here. Thank you.

As an example, I edit the name Kaveithra to 'Kavei', and the name in the list view changed to 'Kavei'. but the problem is the name in the variable TeacherList are still 'Kaveithra'

In order to make changes permanent you have to use tinyDB else every time app restarts the list will get values from global variable

Make sure you have selected an item in the listview

Sorry, I am still a beginner. But if can, can you show me the idea to use TinyDB with my situation

Already doing that, only in the list view changed but not the variable TeacherList text

Something like this:

now when you restart the app, the latest TeacherList will be applied.

3 Likes

A simple example

2 Likes

I appreciate your help. I will try it later. But how about the text that I circle, once I edit Kaveithra's name to Kavei, I hope the text that I circle will also change. Should I do something with this coding?

Thank you in Advance for all help

Instead of using selection and names you could use selection index... If selection index is 1 then do ... else if is 2 ... etc

1 Like

Asides from tutorials, there should never be data encoded into programs, like you did with your teacher names in text blocks.

These are the only text and numbers I would expect to find in a program:

  • 0
  • 1
  • -1
  • '' (blank or empty string)
  • 180
  • Pi
  • ... other mathematical constants
  • special characters, if coding a text parser

If you see examples in this forum with sample data, they are a learning crutch for the rest of the posted code, and not part of recommended coding practice.

1 Like