Delphi 13 Compile Error with RichView 24

General TRichView support forum. Please post your questions here
Post Reply
jimmaguire
Posts: 210
Joined: Thu Sep 15, 2005 1:41 am
Location: California

Delphi 13 Compile Error with RichView 24

Post by jimmaguire »

I'm getting the compile error on this line below: item := RichViewTextItemClass.Create(RVData);

I probably have to change the IFDEF?

Here's the var: item: TRVTextItemInfo;

//InsertMultilineText(RVData, i, j, vStringList.Text);
for j := vStringList.Count-1 downto 0 do
begin
{$IFDEF RICHVIEW22}
item := RichViewTextItemClass.Create(RVData);
{$ELSE}
item := RVItemFactory.TextItemClass;
{$ENDIF}
s := ReplaceCRLFWithSpaces(vStringList[j]);


if IsAddress then
if s = '' then
continue;

item.ParaNo := ParaNo;
item.StyleNo := itemStyleNo;

if j=0 then
begin
item.SameAsPrev := ContinuePara;
item.BR := BR;
end;

item.Inserting(RVData, s, False);

try
RVData.Items.InsertObject(ItemIndex, s, item);
item.Inserted(RVData, ItemIndex);
except
end;
NormalizeRichView(RVData);
end;
Sergey Tkachenko
Site Admin
Posts: 18240
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Delphi 13 Compile Error with RichView 24

Post by Sergey Tkachenko »

Yes, RichViewTextItemClass was removed and replaced with RVItemFactory.TextItemClass.
It is mentioned in the compatibility issues for TRichView 24: https://www.trichview.com/help/new_in_version_24.html

I you want to keep compatibility with the old TRichView versions, you can use $IFDEF.
But the line must be not item := RVItemFactory.TextItemClass; but

Code: Select all

item := RVItemFactory.TextItemClass.Create(RVData);
But if you plan to use the new version of TRichView, just remove the code with RichViewTextItemClass.
Post Reply