Problems with Pchars Tags

General TRichView support forum. Please post your questions here
Post Reply
nico
Posts: 4
Joined: Wed Jul 05, 2006 11:53 am

Problems with Pchars Tags

Post by nico »

Hi!
I save information in tags, such as IDs....

RV_CampoTexto.AddNLTag(testName, 5, -1, Integer(StrNew(PAnsiChar('idTest='+inttostr(idTest)))));

When i click on a hyperlink, i perform some actions. Thats works perfrect.

RV_CampoTexto.GetJumpPointLocation(id,RVData,ItemNo);
Tag := PChar(RV_CampoTexto.GetItemTag(ItemNo));
showmessage ('ID del Test: '+tag);

Then i save the RVF in a blob, when i reload it again, tags content are damaged and a i cannot retrieve the data that i have saved.
So, when i call again those previous lines, it trhrows an access violation. :x

I hope you may help me. :D
Nicolas
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Change
Tag := PChar(RV_CampoTexto.GetItemTag(ItemNo));
to
Tag := PChar(RVData.GetItemTag(ItemNo));
(your code will not work if the link is in table cell).

Make sure that rvoTagsArePChars is included in RV_CampoTexto.Options.
nico
Posts: 4
Joined: Wed Jul 05, 2006 11:53 am

Post by nico »

Thank you! It works perfect :D
Post Reply