CRVData error

General TRichView support forum. Please post your questions here
Post Reply
gbg
Posts: 37
Joined: Sun Apr 11, 2010 4:55 pm

CRVData error

Post by gbg »

i dont use CRVData in my program
but when i close myprogram i get error and delphi want debug CRVData.pas

but i use CRVFData for addnlwtag
:roll:
gbg
Posts: 37
Joined: Sun Apr 11, 2010 4:55 pm

Post by gbg »

if i don`t use addnlwtag program terminate normaly
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please post your code, how you call AddNLWTag
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The most probable reason for this error:
You included rvoTagsArePChars in RichView.Options, so RichView thinks that tags are pointers to strings allocated using StrNew function.
But when you call AddNLWTag, you pass some integer value instead of pointer to the string as a tag.
Am I right?
gbg
Posts: 37
Joined: Sun Apr 11, 2010 4:55 pm

Post by gbg »

Mytext1..5 is wide string;

ReciveText.AddNLWTag('Mytext1',0,0,0);
ReciveText.AddNLWTag('Mytext2',0,0,0);
ReciveText.AddNLWTag('Mytext3',3,-1,100); //
ReciveText.AddNLWTag('Mytext4',0,-1,0);
ReciveText.AddNLWTag('Mytext5',3,-1,101); //
ReciveText.AddNLWTag('Mytext6',0,-1,0);
ReciveText.Format;


procedure ReciveTextJump is :

TCustomRichView(Sender).GetJumpPointLocation(id, RVData, ItemNo);
ReciveText.GetJumpPointLocation(id, RVData, ItemNo);
Tag := RVData.GetItemTag(ItemNo);
if Tag>0 then
begin
if Tag=100 then
begin
s:='\VAC';
.
.
.
end;
if Tag=101 then
begin
s:='\VEDE';
.
.
.
end;
gbg
Posts: 37
Joined: Sun Apr 11, 2010 4:55 pm

Post by gbg »

Sergey Tkachenko wrote:The most probable reason for this error:
You included rvoTagsArePChars in RichView.Options, so RichView thinks that tags are pointers to strings allocated using StrNew function.
But when you call AddNLWTag, you pass some integer value instead of pointer to the string as a tag.
Am I right?
Thanks
this forum dont have thanks button
i set rvoTagsArePChars to false and problem solve
Post Reply