PowerBuilder 12: CopyRTF doesn't copy all text

792 Views Asked by At

Has anyone else experienced this issue? my shop is finally getting around to migrating code from PB8 to PB12.1. My issue is with the RTE control.

This code snippet is located in an fw_save_rtf() event.

     if rte_1.modified and NOT isNull(ldt_eff_dt) and NOT isNull(ls_frm_ver_doc) then

        rte_1.SaveDocument("c:/temp/saveme", FileTypeRichText!, EncodingANSI!)
        ls_rtf = rte_1.CopyRTF(True, Detail!)

        etc....

The result of the rte_1.SaveDocument line is all wording is saved. The result of the CopyRTF method is the last line in the document is dropped.

i've even tried:

rte_1.SelectTextAll(Detail!)
ls_rtf = rte_1.CopyRTF(True, Detail!) 

and that gets a little more of the text to save, but still not everything.

Any comments or suggestions would be most welcome.

Thank you.

1

There are 1 best solutions below

0
On

How about rte_1.CopyRTF(False, Detail!)?

Sybase made changes to the Rich Text control around version 10.5. You might want do dig around in the release notes to see what behavior changed.