Editor Gadget Problem

Just starting out? Need help? Post your questions and find answers here.
spongehammer
User
User
Posts: 84
Joined: Sat Jul 19, 2003 6:45 pm
Location: UK

Editor Gadget Problem

Post by spongehammer »

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
I looked up 'paranoid' in the dictionary this morning.
It said, 'what do you want to know that for?'
User avatar
TomS
Enthusiast
Enthusiast
Posts: 342
Joined: Sun Mar 18, 2007 2:26 pm
Location: Munich, Germany

Re: Editor Gadget Problem

Post by TomS »

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().
spongehammer
User
User
Posts: 84
Joined: Sat Jul 19, 2003 6:45 pm
Location: UK

Re: Editor Gadget Problem

Post by spongehammer »

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 :)
I looked up 'paranoid' in the dictionary this morning.
It said, 'what do you want to know that for?'
Post Reply