Questions? Feedback?powered byOlark live chat software
Bug 2723

Problem trying to retrieve all the text in a richtextedit control 25 June, 2019

David Salmerón
14 May, 2019
Product: PowerBuilder Category: Controls & UI
Version: 2017 R3 Publishing: Public
Status: Verifying Priority: P3
Classification: Appeon bug Resolution:
Mark Lee 25 June, 2019
Hi David,
 
Yes, we are planning a fix in PB 2017 but currently we are not clear when the new PB 2017 MR will be released.
Once it is released, I will inform you here.
Furthermore, we suggest you use PB 2019.

Regards,
Mark Lee
David Salmerón 25 June, 2019
Thanks Mark, but the issue was reported in Powerbuilder 2017... Are you planning a fix in this version as well?
Mark Lee 14 June, 2019
Hi David,

Appeon PowerBuilder 2019 GA is officially released and available for
downloading. 
The issue in this ticket is fixed in this new release. 
You can get the installer from our portal using this link to verify if it
resolves the issue on your side: 
https://www.appeon.com/user/center/index?menu=download 

Regards,
Mark Lee
Mark Lee 15 May, 2019
Hi David,

Yes, you are right. We are also missing the final dot.
We reproduced it on our end and will do further research to figure it out.
We will keep you posted about the progress.

Regards,
Mark Lee
David Salmerón 14 May, 2019
RTE_issue.png (40KB)

Thanks Mark for the quick answer. However, I am afraid the problem remains unsolved. Maybe I didn't make myselft clear enough. 

I am aware that the rtf string is using "/par", which as far as I understand, is the correct syntax. However, we do not generate these strings ourselves; they come from a different application and are stored in the database. Our purpose is to get the same string in "plain text" format. In this particular example, we are expecting to get a string that ends with "tortor.", plus a "new line" (CR+LF). But we only get "tortor" (without the dot) and no new line.

I am attaching a screenshot of the dummy application we made to test the error. In the upper part you can see the text as it appears in the control, and below what we get with the SelectedText command.

The problem, as you can see, is not strictly on the carriage return: we are also missing the final dot. 
We have tried several rtf strings and always lose some of the characters in the end.
Mark Lee 14 May, 2019
Hi David,

Thanks for reporting this problem.
 
We checked the format of the provided rtf, and found that "tortor.\par" instead of "tortor.~r~n" is used for the PasteRTF method in the PB code.
If you need to use the format "tortor.~r~n", please try to replace it with contents of "tortor.~~r~~n \par".
 
Besides, "~" and "\" are special characters in rtf, so you cannot get the values with what you see on UI.
 
Please let us know if the above resolves your problem.

Regards,
Mark Lee
Mark Lee 14 May, 2019
rtf content
David Salmerón 14 May, 2019
RTE_issue.txt (2KB)

*Phenomenon:
We use a richtextedit control to convert RTF text to plain text. The string we get has some missing characters at the end.

*Reproduce Steps:
Paste the RTF text into the control:
rte_texto.PasteRTF(ls_rtf)
Get the string in plain format:
rte_texto.SelectTextAll()
ls_txt = rte_texto.SelectedText()

The string is missing two or three characters at the end. In the example provided, we get "tortor" instead of "tortor.~r~n" as expected.

Remarks:
Powerbuilder 2017 R3 Build 1880.
Using "Built-in TX Text Control" in Application Additional Properties | RichTextEdit tab.
OS:
Windows 8 
Platform:
64-bit 
Database Type:
SAP SQL Anywhere 
Database Version:
SQL Anywhere Personal Server Version 12.0.1.3152