i have already seen dat, actually the code which im applying in container is:
the compiler is not able to identify aVar,.so if u can help
TBuf8<200>aVar;
iEditor->aVar.GetText(aVar);
RFile File;
RFs iFs;
iFs.Connect();
File.Replace(iFs,_L("\C\\Data\\Others\\File.txt"),EFileWrite);
File.Write(aVar);
File.Close();
iFs.Close();
The editor provides the text as a 16 bit descriptor, so you have to get the text to a TBuf, not TBuf8. Then you need to convert/copy the text to a 8 bit descriptor and write that to the file.
Also, check the CEikEdwin docs -- there are methods there to write the text to a stream (if you use those) directly from the edwin object.
im getting an error in the line:
Editor->aVar.GetText(aVar);
it says undefined identifier aVar
its declared in container only and no where else
i hav also included aVar in the header of container
Forum posts: 706
http://wiki.forum.nokia.com/index.php/Reading_and_writing_files
Forum posts: 16
i have already seen dat, actually the code which im applying in container is:
the compiler is not able to identify aVar,.so if u can help
TBuf8<200>aVar;
iEditor->aVar.GetText(aVar);
RFile File;
RFs iFs;
iFs.Connect();
File.Replace(iFs,_L("\C\\Data\\Others\\File.txt"),EFileWrite);
File.Write(aVar);
File.Close();
iFs.Close();
Forum posts: 608
The editor provides the text as a 16 bit descriptor, so you have to get the text to a TBuf, not TBuf8. Then you need to convert/copy the text to a 8 bit descriptor and write that to the file.
Also, check the CEikEdwin docs -- there are methods there to write the text to a stream (if you use those) directly from the edwin object.
Forum posts: 16
im getting an error in the line:
Editor->aVar.GetText(aVar);
it says undefined identifier aVar
its declared in container only and no where else
i hav also included aVar in the header of container