1. Pierre DETE
  2. PowerBuilder
  3. Friday, 08 November 2019

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
0
Votes
Undo

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.
  1. Wednesday, 13 November 2019
  2. PowerBuilder
  3. # 1
Miguel Leeuwe Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Tuesday, 12 November 2019
  2. PowerBuilder
  3. # 2
Pierre DETE Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Tuesday, 12 November 2019
  2. PowerBuilder
  3. # 3
Armeen Mazda Accepted Answer Pending Moderation
1
Votes
Undo

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
That is great news Armeen!

I assume, that this will also cover InfoMaker as well?
  1. Chris Pollach
  2. Friday, 8 November 2019
Yes
  1. Armeen Mazda
  2. Friday, 8 November 2019
Awesome! :-)
  1. Chris Pollach
  2. Friday, 8 November 2019
There are no comments made yet.
  1. Friday, 8 November 2019
  2. PowerBuilder
  3. # 4
Pierre DETE Accepted Answer Pending Moderation
0
Votes
Undo

 

 

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
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. Chris Pollach
  2. Friday, 8 November 2019
There are no comments made yet.
  1. Friday, 8 November 2019
  2. PowerBuilder
  3. # 5
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Friday, 8 November 2019
  2. PowerBuilder
  3. # 6
  • Page :
  • 1


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