1. Pierre DETE
  2. PowerBuilder
  3. Friday, 8 November 2019 17:18 PM UTC

Hi PB users,

 

We have an issue with a big RichtextEdit control using SelectedText() in Powerbuilder 2017.

When the size exceed exactly 28665 characters in 1027 lines Powerbuilder Crash.

I know this is huge amount of characters but our client ague that it was working before with Powerbuilder 12.5.

Any idea?

 

Pierre

 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 13 November 2019 05:09 AM UTC
  2. PowerBuilder
  3. # 1

Hi, 

 

The workaround of 

rte_1.selecttextall ()
rte_1.copy()
mle_sql.Text = Clipboard()

 

is okay, if you don't care about RTE formatting. If your formatting of bold, colors, etc. is not important then you might as well directly use a mle instead of a richtext edit to start with ...

Maybe it's not of much help, but I've discovered that there's some kind of relation between the amount of returns before your text and after your text:

If you have the same amount of enters after the text +1, as the amount of enters/returns you have before the text, at least the text itself is not being truncated. You will still have enters before and after being stripped of but you might be able to work around that.

So my suggestion is to do something like:

1) try to delete all first enters and last enters around your text. Maybe that can be done with SelectText() and then replace that. Assumed of course that the replace on a single selected enter would work ..

or if that doesn't work out ...

2) try to trail your text with as much enters you have at the beginning + 1. So if you have 2 enters at the start of your complete text, then make sure you have 3 enters after the last character of your text. You would have to position your insertion point / cursor at the end of the text and then paste in some enters.

 

If I have some time, I'll try to do this myself but to be honest, I'm quite busy these days.

 

HIH.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 12 November 2019 18:47 PM UTC
  2. PowerBuilder
  3. # 2

As a workaround for the coming .. let's say 2 years: https://community.appeon.com/index.php/qna/q-a/outlook-email-using-richertext-activex/oldest#filter-sort

 

It's not perfect yet, so forgive me, I have little time, but will try to make it more functional these 2 weeks that are ahead.

Comment
There are no comments made yet.
Pierre DETE Accepted Answer Pending Moderation
  1. Tuesday, 12 November 2019 10:17 AM UTC
  2. PowerBuilder
  3. # 3

I Armeen for now I can't see how we can use Tx Text mode as the ReplaceText is not working properly.

Regards Pierre.

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 8 November 2019 17:50 PM UTC
  2. PowerBuilder
  3. # 4

Please use the TX Text Control.  We have come to an agreement with the vendor to get significant enhancements including 64-bit support.  TX Text Control will be the RichTextEdit implementation we plan to standardize on for the long-term.

Comment
  1. Chris Pollach @Appeon
  2. Friday, 8 November 2019 20:57 PM UTC
That is great news Armeen!

I assume, that this will also cover InfoMaker as well?
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 8 November 2019 21:39 PM UTC
Yes
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 8 November 2019 21:43 PM UTC
Awesome! :-)
  1. Helpful
There are no comments made yet.
Pierre DETE Accepted Answer Pending Moderation
  1. Friday, 8 November 2019 17:46 PM UTC
  2. PowerBuilder
  3. # 5

 

 

Hi Chris,

 

We have another problem with TX control, ReplaceText is not working. It truncs some characters if you have ~r~n end of line sequence in the Richtextedit.

For now I think I have workaround using clipboard to get the selected huge text.

rte_1.selecttextall ()
rte_1.copy()
mle_sql.Text = Clipboard()
// mle_sql.Text = rte_1.SelectedText ()

 

Pierre

 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 8 November 2019 20:54 PM UTC
Excellent alternative Pierre as a "workaround"!

As Armeen mentioned already though .. please open a Support Ticket for these issues so that Appeon can get these RTE issues addressed. Especially, with the TE control.

Many thanks in advance!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 8 November 2019 17:29 PM UTC
  2. PowerBuilder
  3. # 6

Hi Pierre;

  If you open the Application Painter => Additional Properties => RichTextEdit tab page and the setting is for the "Built in control". Please change this to the TX control and retry your test.

HTH

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.