trichview.com

trichview.support




Re: List of Checkpoints


Return to index


Author

Message

Wayne Edward

Posted: 12/19/2002 13:28:11


Are you getting errors?


I think because TCheckPointData is a pointer then cp.name won't work.

You need to use the GetCheckpointInfo to retrieve the name and tag

values.


Before adding items to the combo try like this:

add:

var

   cp: TCheckPointData;  

   Name: String;

   Tag: Integer;

begin

   cp:= FormeCourrante.RichViewEdit1.GetFirstCheckPoint;

   if cp<> nil then begin

      FormeCourrante.RichViewEdit1.GetCheckpointInfo(cp, Tag, Name,

RaiseEvent);

      cmbEditNomCheckpoint.Items.Add(Name);

      cmbEditTagCheckpoint.Items.Add(IntToStr(Tag));

.

.

.




On 19 Dec 2002 15:15:12 +0300, "visitorrr" <[email protected]>

wrote:


>

>I want to make the list of the Checkpoints who are in my RVF file. I have

>one list for the tag and one list for the name. Please correct my code :

>

>procedure TFormGotoCheckpoint.FormCreate(Sender: TObject);

>var cp: TCheckpointData;

>begin

>  if FormeCourrante.RichViewEdit1.GetFirstCheckpoint <> nil then

> begin

>   cp := FormeCourrante.RichViewEdit1.GetFirstCheckpoint;

>   cmbEditNomCheckpoint.Items.Add(cp.Name);

>   cmbEditTagCheckpoint.Items.Add(IntToStr(cp.Tag));

>  while FormeCourrante.RichViewEdit1.GetNextCheckpoint(cp) <> nil do begin

>     cp := FormeCourrante.RichViewEdit1.GetNextCheckpoint(cp);

>     cmbEditNomCheckpoint.Items.Add(cp.Name);

>     cmbEditTagCheckpoint.Items.Add(IntToStr(cp.Tag));

>  end;

> end;

>end;

>

>Thanks a lot !





Powered by ABC Amber Outlook Express Converter