trichview.com

trichview.support




Re: AV when clicking on hyperlinks in table


Return to index


Author

Message

Yoerdes

Posted: 08/19/2003 23:52:37


This currently looks this way:


procedure TForm1.RVURLNeeded(Sender: TCustomRichView; ID:

   Integer; var URL: string);

var

   RVData: TCustomRVFormattedData;

   ItemNo: Integer;

begin

   Sender.GetJumpPointLocation(ID, RVData, ItemNo);

   URL := PChar(RVData.GetItemTag(ItemNo));

end;


The problem is that the correct URL is actually found and assigned to

rve.hint, but it doesn't show up (unless the caret is in the link

even if it's hidden).


Regards

Kerstin



Sergey Tkachenko wrote:


> GetURL (by this way, this is a method for internal use) calls

> rve.OnURLNeeded.

> What is your code for this event?

>

>

>

>>But there is another little issue with hyperlinks in tables.

>>I'm using the following code to display the URL as hint in a readonly

>>rve:

>>

>>procedure TForm1.RVMouseMove(Sender: TObject; id: Integer);

>>var

>>   rve: TRichViewEdit;

>>

>>begin

>>   if Sender is TRichViewEdit then

>>   begin

>>     rve := TRichViewEdit(Sender);

>>     Application.CancelHint;

>>     try

>>       with rve do

>>         if ID = -1 then

>>           Hint := ''

>>         else

>>           Hint := RVData.GetURL(ID)

>>     finally

>>       Application.ShowHint := TRUE;

>>     end;

>>   end;

>>end;

>>

>>This works nicely for all URLs outside of tables. It also works

>>for an URL inside of a table /after/ it was clicked directly before,

>>but not otherwise.

>>

>>What's missing?

>>

>>Regards

>>Yoerdes

>>

>>

>>But there is something

>>

>>Sergey Tkachenko wrote:

>>

>>>I cannot reproduce this bug with the latest version of TRichView and

>>>ActionTest demo.

>>>Please give me step-by-step instruction how to reproduce the problem.

>>>

>>>Was your application compiled with optimization? In this case, even if

>

> the

>

>>>exception was in your OnJump event, debugger may show different method.

>>>

>>>

>>>

>>>

>>>>When I set the RVE to readonly to test hyperlinks, those outside

>>>>of tables work well but those in tables cause an AV and after

>>>>that a "List index out of bounds" error occurres everytime I click

>>>>on the RVE, readonly or not.

>>>>

>>>>The AV occures before the Jump method is triggered. The debugger

>>>>stops at the end of TRVTableInplaceEdit.MouseMove.

>>>>

>>>>Regards

>>>>Yoerdes

>>>>

>>>

>>>

>>>

>

>





Powered by ABC Amber Outlook Express Converter