Page 1 of 1

CRVData error

Posted: Sat Jun 05, 2010 11:47 am
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:

Posted: Sat Jun 05, 2010 12:05 pm
by gbg
if i don`t use addnlwtag program terminate normaly

Posted: Mon Jun 07, 2010 3:26 pm
by Sergey Tkachenko
Please post your code, how you call AddNLWTag

Posted: Mon Jun 07, 2010 6:31 pm
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?

Posted: Wed Jun 16, 2010 2:09 pm
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;

Posted: Wed Jun 16, 2010 2:14 pm
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