Hi,
i am having difficulty understanding how to do the following:
I read the contents of the editor gadget into a string-
Line 1
Line 2
Line 3
Write the string to a text file. the contents of the file look as above when viewed in notepad.
Read the string from the file into a string and put back into the Editor Gadget. However i only see-
Line 1
I have tried using replacestring to replace the linefeed with a ~
Looking at the written file in notepad it looks like this-
Line 1~Line 2~Line 3
But when read back into the Editor Gadget i see -
Line 1~
Can someone give me a clue how to save the text to a file and read it back in as is.
Thanks
Editor Gadget Problem
-
- User
- Posts: 84
- Joined: Sat Jul 19, 2003 6:45 pm
- Location: UK
Editor Gadget Problem
I looked up 'paranoid' in the dictionary this morning.
It said, 'what do you want to know that for?'
It said, 'what do you want to know that for?'
Re: Editor Gadget Problem
Could you post some code?
My guess is, that you only use ReadString() once to load the filecontents into the gadget.
You have read every line, until EOF()=1
Or try ReadData() and PeekS().
My guess is, that you only use ReadString() once to load the filecontents into the gadget.
You have read every line, until EOF()=1
Or try ReadData() and PeekS().
-
- User
- Posts: 84
- Joined: Sat Jul 19, 2003 6:45 pm
- Location: UK
Re: Editor Gadget Problem
Hi Tom,
thanks for the quick reply.
its funny isnt it. I have spent ages looking for the reason why it was happening.
Then when i wrote a small sample to post here i actually got it working as I wanted! typical
thanks for the quick reply.
its funny isnt it. I have spent ages looking for the reason why it was happening.
Then when i wrote a small sample to post here i actually got it working as I wanted! typical

I looked up 'paranoid' in the dictionary this morning.
It said, 'what do you want to know that for?'
It said, 'what do you want to know that for?'