Page 1 of 1

Error on SaveText

Posted: Tue Sep 06, 2005 12:56 pm
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?

Posted: Tue Sep 06, 2005 1:33 pm
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.

Posted: Tue Sep 06, 2005 2:13 pm
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!