On Thu, 23 Nov 2006 19:33:38 +0300
Sergey Kamenskiy <[EMAIL PROTECTED]> wrote:

> Im work on helpconfig Bug 
> http://www.freepascal.org/mantis/view.php?id=7775
> and complit lost.
> 
> error in save function.
>  helpoptions.xml:
> <?xml version="1.0"?>
> <CONFIG>
>   <HelpOptions>
>     <Version Value="1"/>
>     <FPCDocs>
>       <HTML Directory="/home/briz/fpc-doc/doc/"/>
>     </FPCDocs>
>   </HelpOptions>
>   <Databases>
>     <RTLUnits>
>       <BaseURL Value="file:///home/briz/fpc-doc/doc/rtl/"/>
>     </RTLUnits>
>     <FCLUnits>
>       <BaseURL Value="file:///home/briz/fpc-doc/doc/lcl/"/> 
> <----------------------######### error- need .../doc/fcl
>     </FCLUnits>
> <-----------------############error- lost LCLUnits
>   </Databases>
> </CONFIG>
> 
> i think error in lcl/LazHtmlIntf.pas

I guess, you mean: lcl/lazhelpintf.pas


>   THelpDatabase = class(TComponent)
>   ...
>     procedure Load(Storage: TConfigStorage); virtual;
>     procedure Save(Storage: TConfigStorage); virtual;
>     function GetLocalizedName: string; virtual;
> ...
>   end;
> ...
> procedure THelpDatabase.Load(Storage: TConfigStorage);
> begin
> end;
> procedure THelpDatabase.Save(Storage: TConfigStorage);
> begin
>   debugln('VIRTUAL!!!!');  <---------------- ############# i see this 
> message !!! mast bee error here
> end;

Virtual: yes, abstract: no.

THelpDatabase has nothing to save yet. Maybe in future it will have a
property to save. Then there will be code.

 
> start this functios like this
> procedure THelpDatabases.Save(Storage: TConfigStorage);
> var
>   i: Integer;
>   HelpDB: THelpDatabase;
>   Path: String;
> begin
>   for i:=0 to Count-1 do begin
>     HelpDB:=Items[i];
>     Path:=HelpDB.ID;
>     DebugLN('THelpDatabases.Save i='+Dbgs(i)+' path='+HelpDB.ID);
>     if (Path='') or (not IsValidIdent(Path)) then continue;
>     Storage.AppendBasePath(Path);
>     try
>   DebugLN('THelpDatabases.Save i='+Dbgs(i)+' path='+HelpDB.ID+' ');
>       HelpDB.Save(Storage); <----------------- ######## i see message 
> VIRTUAL!!!! but file created here. HOW?
>   DebugLN('THelpDatabases.Save noerror');
>     finally
>      Storage.UndoAppendBasePath;
>     end;
>   end;
> end;
> 
> HOW IS IT WORK?

(Do not shout please)
THelpDataBase is a base class.
The FCL help database is a TFPDocHTMLHelpDatabase created in
ide/helpmanager.pas CreateFCLHelpDB.
TFPDocHTMLHelpDatabase is a THTMLHelpDatabase, which overrides the Save
method:

procedure THTMLHelpDatabase.Save(Storage: TConfigStorage);
begin
  inherited Save(Storage);
  Storage.SetDeleteValue('BaseURL/Value',BaseURL,DefaultBaseURL);
end;


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to