Friends,
In an app data is browsed from a notepate .txt file and stored in TinyDB. In the text there are several \n . When the app lode data on a label from the tinyDB , the \n do not create new lines. Instead \n are displayed on label.
--
Help is appreciated. Thanks.
Update
I use window 7 pc
--
I use window 7 pc
--
did you enable HTML format in the label? If yes, then <br> gives you a new line
Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
If you are loading the label text from a file, you do not need to put \n in the file. Rather, simply put a new line (using your enter/return key). The reason why you put \n in the text fields in the designer and blocks editors is due to the fact that the languages we are using do not support having the new line character inside of a string. The \n is translated during interpretation/compilation into the new line character you are used to getting when you press the enter key. Since you are bypassing that whole limitation by loading the file you do not need to write the literal \n.
Evan
Thanks to Taifun and Evan Patton.
--
댓글 없음:
댓글 쓰기