Page 1 of 1

Problems with Pchars Tags

Posted: Wed Jul 05, 2006 12:15 pm
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

Posted: Wed Jul 05, 2006 6:21 pm
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.

Posted: Thu Jul 06, 2006 11:46 am
by nico
Thank you! It works perfect :D