2014년 12월 3일 수요일

How can I use 'list from csv table'

i try to program a vocabulary trainer app with MIT APP Inventor 2.
The words are in a csv-file.
I have upload this file to the Media Box.
How can I get the words in a list to work with them in the app ?
Do you know an example for this ?
Shall I put the english-words in one csv-file and the german words in another, or is it possible to get the englisch word and the german word from the same csv-file ?
How have I to use the "," or the "/" in the csv-file ?



use the file component and the File.ReadFrom block, then in the File.GotText event you get the result http://ai2.appinventor.mit.edu/reference/components/storage.html#File

probably it's easier for you to use 2 files for each language, e.g.

apple
banana
cake

Apfel
Banane
Kuchen

if you want to import a 1 column csv table as in this case, I recommend you to use the split at block and split at \n (new line) to get a simple list of the words


댓글 없음:

댓글 쓰기