Enum bookmarks manually
Posted: Wed Dec 21, 2016 9:16 am
Please help me fill my ComboBox with checkpoints from RVE.
I checked BookmarkRVFrm.pas from Actions and did almost everything like there but it doesn't work. My EnumCheckpoints procedure never fires but I have several bookmarks in my document.
First of all I need to load my RVF from DB to a new empty RV.
I didn't even use RVStyle, just created TRichView and loaded from stream.
rve.RVData.EnumItems always return True;
My EnumCheckpoints:
I checked BookmarkRVFrm.pas from Actions and did almost everything like there but it doesn't work. My EnumCheckpoints procedure never fires but I have several bookmarks in my document.
First of all I need to load my RVF from DB to a new empty RV.
I didn't even use RVStyle, just created TRichView and loaded from stream.
Code: Select all
type
TCheckpointLocation = class
public
RVData: TCustomRVData;
ItemNo: Integer;
end;
Code: Select all
rve:=TRichView.Create(nil);
...
rve.LoadRVFFromStream(TmpStream);
rve.Format;
...
v:=0;
rve.RVData.EnumItems(EnumCheckpoints,v,'');
...
rve.Free;
My EnumCheckpoints:
Code: Select all
procedure EnumCheckpoints(RVData: TCustomRVData; ItemNo: Integer; var UserData1: Integer; const UserData2: String; var ContinueEnum: Boolean);
var Loc: TCheckpointLocation;
CP: TCheckpointData;
RaiseEvent :Boolean;
Tag: TRVTag;
Name: String;
begin
CP:=RVData.GetItemCheckpoint(ItemNo);
if CP<>nil then begin
Loc:=TCheckpointLocation.Create;
Loc.RVData:=RVData.GetSourceRVData;
Loc.ItemNo:=ItemNo;
RVData.GetCheckpointInfo(CP, Tag, Name, RaiseEvent);
// Here I just want to fill ComboBox with bookmark names to use in URL after #
BookmarksCombo.Items.Append(Name);
end;
end;