Error on SaveText

General TRichView support forum. Please post your questions here
Post Reply
Petko
Posts: 174
Joined: Tue Sep 06, 2005 12:42 pm

Error on SaveText

Post by Petko »

When I try to export TRichViewEdit content using the SaveText command, I get the following error message:

---------------------------
Debugger Exception Notification
---------------------------
Project MyInfo.exe raised exception class ERichViewError with message 'Can't perform Unicode operation'. Process stopped. Use Step or Run to continue.
---------------------------

After this error message, the text is still exported, however only the first paragraph. The rest of the RV content is missing in the exported file.

The same content is exported fine using the SaveRTF command.

What could be the cause for this problem?
Sergey Tkachenko
Site Admin
Posts: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This error occurs if a string that is supposed to contain Unicode text does not contain it.
It is a result of incorrect document generation.
Check - may be you use AddNL or SetItemText to add/modify text of Unicode style. It will lead to the corrupted document.
Use AddNLATag (or AddNLWTag) and SetItemTextA (or SetItemTextW) instead.
Petko
Posts: 174
Joined: Tue Sep 06, 2005 12:42 pm

Post by Petko »

It seems that the problem was caused by the use of the obsolete AddText command. I have changed it with the Add command and it runs fine now. Thank you for the help!
Post Reply