trichview.com

trichview.support




Re: Constructure URL


Return to index


Author

Message

Sergey Tkachenko

Posted: 08/09/2002 10:48:31


winMakLinkExecute has the same problem.


Items of cells are not items of the root editor. Hence it's impossible to

access items in cells using ItemNo.


Inside OnURLNeeded, you need to use RVData->SomeMethod(ItemNo), where RVData

and ItemNo are returned by GetJumpPointLocation.


In winMakLinkExecute, if caret is inside cell, rve->CurItemNo points to the

table, not to the item inside table cell.

So you can

a) use only Current*** methods, such as SetCurrentTag, avoiding using

CurItemNo

or

b) work with rve->TopLevelEditor instead of rve

rve->TopLevelEditor->SetItemTagEd(rve->TopLevelEditor->CurItemNo, tag)




> Hello Sergey,

>

> Still got the problems.

> For case 1:

> I input the following;

> line1 > "link1 link2"

> line2 > "link3"

> line3 >

> line4 > create table with 2 row and col.

> inside the table [0,0] "link4"

> [1,1] "link5"

>

> then i select all of the link one by one and assign the url in different

> address using the method winMakLinkExecute() then i preview in html

format.

> During execute the prg. from the watch list i found that most of the

itemNo

> and tag are corrected. But, from the rveURLNeeded() event i found some of

> the itemNo are skipped. So that why the html will some broken link .

>

> Case 2:

> If i save the into the RVF file, when i reopen the file again, from the

preview

> in html format most of the link will change.

>

> Is there any ideas?

>

> Thank you very much for your support.

>

>

> Cheers,

>

>

> "Sergey Tkachenko" <svt@trichview.com> wrote:

> >Use

> >tNo = RVData->GetItemTag(itemNo);

> >inside rveURLNeeded

> >

> >>

> >> Hi Sergey,

> >>

> >> Thank you for your support. Here is the codes. Right now i can

construct

> >> the URL within the table because our application not necessary open the

> >url

> >> from the rve. But,

> >> if i use the method "rve->SetItemTagEd(itemNo, tag)" it will construct

> the

> >> empty link.

> >>

> >> if i use "rve->SetCurrentTag(tag)" it will produces the same URL

address

> >> if more than one link made.Is that the memory address refer to the same

> >place?

> >>

> >> Any ideas?

> >>

> >>

> >> void __fastcall TfrmDesigner::rveURLNeeded(TCustomRichView *Sender, int

> >id,

> >>       AnsiString &url)

> >> {

> >> // randomize();

> >>   int itemNo;

> >>   int tNo;

> >>   AnsiString mURL;

> >>   TCustomRVFormattedData *RVData;

> >>   rve->GetJumpPointLocation(id, RVData, itemNo);

> >>   tNo = rve->GetCurrentTag();

> >>   // tNo = rve->GetItemTag(itemNo);

> >>

> >>   mURL = AnsiString ((char*) tNo);

> >>   if(IsHTTP(mURL))

> >>     url = mURL;

> >>   else

> >>   url = "http://" + mURL;

> >> }

> >> /----------------------------------------------------------------

> >> void __fastcall TfrmDesigner::winMakLinkExecute(TObject *Sender)

> >> {

> >>   AnsiString url = InputBox("URL", "URL", "URL");

> >>   if(url.AnsiCompareIC("url") == 0)

> >>   return;

> >>   if(!IsAddress(url)){

> >>   ShowMessage("Invalid URL address.");

> >>     return;

> >>   }

> >>

> >>   int itemNo = rve->CurItemNo;

> >>   TCustomRVItemInfo *RVItem;

> >> RVItem = rve->GetCurrentItem();

> >>

> >>   rve->ApplyTextStyle(4);

> >>   int tag = (int) StrNew(url.c_str());

> >>   rve->SetItemTagEd(itemNo, tag);

> >> }

> >> //---------------------------------------------------------------

> >>

> >> Thanks again...

> >>

> >> Cheers

> >>

> >> "Sergey Tkachenko" <svt@trichview.com> wrote:

> >> >> By the way, the method i used current is

> >> >> rve->GetJumpPointLocation(id, RVData, itemNo);

> >> >>

> >> >

> >> >Please post a complete code which you execute in OnJump.

> >> >

> >> >

> >>

> >

> >

>





Powered by ABC Amber Outlook Express Converter