Board index » cppbuilder » "RichEdit line insertion error"

"RichEdit line insertion error"

Using BCB4 I get, "RichEdit line insertion error" when I try to edit a
property that is "TStrings" --OR-- it brings up the TStrings edit box,
but will not accept alphabetic characters (though it will accept
numbers!).

This didn't used to happen so I deinstalled BCB4, did a full reinstall
and it still happens.

Help Mr. Wizard...

Thanks,      Paul

 

Re:"RichEdit line insertion error"


Hi, Paul.

Quote
> Using BCB4 I get, "RichEdit line insertion error" when I try to edit a
> property that is "TStrings" --OR-- it brings up the TStrings edit box,
> but will not accept alphabetic characters (though it will accept
> numbers!).

> This didn't used to happen so I deinstalled BCB4, did a full reinstall
> and it still happens.

> Help Mr. Wizard...

Mr. Wizard stepped out, but maybe I can help.  FWIW, using the Lines
(TStrings) property is easy but not really a great idea for large files
(depending upon your implementation, to be fair).  If you are working
with large amounts of text, I suggest that you might want to avoid the
VCL and use the WinAPI instead.  See
http://home.att.net/~robertdunn/Yacs.html for information on how to do
this.

HTH.

robert

Re:"RichEdit line insertion error"


Robert,

Thanks, but I was unclear on WHERE the error occurs.  I don't get the error
when I run my program.

I get the error, "RichEdit line insertion error" when I am editing a
"TStrings" property in the IDE!

Any clues on that?

-- Paul

Re:"RichEdit line insertion error"


Hi, Paul.

Quote
> Thanks, but I was unclear on WHERE the error occurs.  I don't get the error
> when I run my program.

> I get the error, "RichEdit line insertion error" when I am editing a
> "TStrings" property in the IDE!

> Any clues on that?

Oh, that is different.  Well, here are a few ideas.  Let me know if any
solve it.

(1) You are using a Rich Edit 2.0-based component.  (You should know if
you are -- if you are using the VCL TRichEdit component, then you
definitely are not.)

(2) You are attempting to insert a line containing more than 4096 bytes.

(3) You are trying to insert more than 32,767 bytes of text total.

(4) You are trying to insert text that, somehow, results in a different
number of characters within the RE control.  Ok, this is vague.  Here is
the idea:  TRichEdit tests to see if the number of characters in the
control after insertion is exactly equal to the number of characters in
the control before insertion plus the number of characters in the line
being inserted.  I cannot think of an example where this might be the
case.  Well, maybe if the RE control was working in a foreign language
that causes the RE control to merge characters somehow.  Or maybe you
are using cut/paste with a line containing embedded null characters.  Or
maybe the editor does not wrap text and the RE does wrap text resulting
in extra line-wrap characters in the RE.  Anyway, seems unlikely.

If none of that helps, please describe what you are doing/inserting,
when it occurs (consistently after so many lines, inconsistent, etc.),
and what BCB version you are using.

HTH.

robert

Re:"RichEdit line insertion error"


Robert,

Thanks for this response.

Quote
> (1) You are using a Rich Edit 2.0-based component.  (You should know if
> you are -- if you are using the VCL TRichEdit component, then you
> definitely are not.)

I am NOT using a TRichEdit at all, but it seems the BCB IDE does.
The error occurs when I try to open the property editor for a TStrings property
for a component IN THE IDE.

For example:
-- I create a new application and place a Memo component on the form.
-- If I try and open the property editor for the "Lines" property of the memo I
get, "RichEdit line insertion error".

I am using BCB4.  This never used to happen (obviously), but in the course of
installing 3rd-party components or just plain using BCB my IDE is now corrupted.
I've done removed BCB4 and done a complete reinstall and it still happens.

Re:"RichEdit line insertion error"


Hi, Paul.

Quote
Paul Drust wrote:
> For example:
> -- I create a new application and place a Memo component on the form.
> -- If I try and open the property editor for the "Lines" property of the memo I
> get, "RichEdit line insertion error".

Well, that *is* odd.  TMemo is not a Rich Edit control -- it is a
multi-line Edit control.  I am baffled.  However, you may be able to
assign the text at runtime to work around the IDE property editor
problem (assuming that it *is* a property editor problem).

Good luck!

robert

Other Threads