trichview.com Forum Index trichview.com
TRichView support forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

hyperlink problem

 
Post new topic   Reply to topic    trichview.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
strobbekoen



Joined: 16 May 2010
Posts: 3

PostPosted: Sun May 16, 2010 2:19 pm    Post subject: hyperlink problem Reply with quote

Hi,

I am having a problem with hyperlinks.

Here is the scenario I am using :

I have a Form with a TRichView which displays the text. The text comes from RVF format. To edit the text, I open another form with a TRichViewEdit component and copy the text from the viewer to the editor as follows :

procedure TFrameRTFViewer.CopyToEditor(Editor: TRichViewEdit);
var
M: TMemoryStream;
begin
M := TMemoryStream.Create;
try
rvBody.SaveRVFToStream(M, False);
M.Position := 0;
Editor.LoadRVFFromStream(M);
Editor.Reformat;
finally
M.Free;
end;
end;

I then create hyperlinks on the text in the editor. The Target of the hyperlink is formatted in a string as '{guid string};1'

When I click Save , the content is copied back from editor to viewer :

procedure TFrameRTFViewer.CopyFromEditor(Editor: TRichViewEdit);
var
M: TMemoryStream;
begin
M := TMemoryStream.Create;
try
Editor.SaveRVFToStream(M, False);
M.Position := 0;
rvBody.LoadRVFFromStream(M);
rvBody.Reformat;
finally
M.Free;
end;
end;

The problem is that the hyperlinks are not saved correctly.
Both viewer and editor have rvoTagsArePChars = True. RVFOptions are set the same as well.
It seems all hyperlinks receive the same Target tag. However, I debugged the code tracking RVFSaveTag, and they were saved correctly. They just don't load correctly.

Strange problem, I can't figure it out.
Back to top
View user's profile Send private message
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 6607

PostPosted: Sun May 16, 2010 5:43 pm    Post subject: Reply with quote

What version of TRichView and of Delphi?
Version 12.0 had a bug related to tags in Delphi 2009-2010, it was fixed in newer version (available for registered users)
Back to top
View user's profile Send private message Visit poster's website
strobbekoen



Joined: 16 May 2010
Posts: 3

PostPosted: Mon May 17, 2010 8:38 am    Post subject: Reply with quote

It is Delphi 2009 with Richview v11.0.5
Back to top
View user's profile Send private message
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 6607

PostPosted: Mon May 17, 2010 9:14 am    Post subject: Reply with quote

This problem must be fixed in the latest version.
Now you have access to the protected area and can download it.
Back to top
View user's profile Send private message Visit poster's website
strobbekoen



Joined: 16 May 2010
Posts: 3

PostPosted: Mon May 17, 2010 10:08 am    Post subject: Reply with quote

Thank you, it works with new version.
Appreciate your quick help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    trichview.com Forum Index -> Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group