saving and loading a textarea

BlitzMax Forums/BlitzMax Beginners Area/saving and loading a textarea

CloseToPerfect(Posted 2010) [#1]
can someone show me how to write the content of a text area to a file and load a file doc to a text area,
Thank you


CloseToPerfect(Posted 2010) [#2]
outstream = WriteStream(file$)
SaveText(TextAreaText(currentdocument),outstream)
CloseStream(outstream)

here is how I was trying to do this but after it creates the file it crashes with out writing any of the textarea


CloseToPerfect(Posted 2010) [#3]
OK my problem was a local variable.

So I have a new question, the save file has no EOLs. it's just on long line of text.

Is there a way to have it write lines?
Do I need to write each line of the text area 1 at a time?


CloseToPerfect(Posted 2010) [#4]
Never mind figured it out.

CTP