On Sat, 13 May 2006 11:33:02 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:
> On 13/05/06, Felipe Monteiro de Carvalho
> <[EMAIL PROTECTED]> wrote:
> > It is just my oppinion, but I think that a model with Interfaces to be
> > implemented is more straigth forward and easier to be understood for
> > people creating software with Lazarus.
> >
> > Looking at HelpIntfs the way it is currently, it´s very hard to find
> > out what should I implement, what class to derive from to build by own
> > viewer / db? Also a interface has a advantage here that it can be
> > utilized on a class derived from anything.
>
>
> I agree with Felipe on this. Not having used interfaces much, but
> comparing the Lazarus HelpIntf unit with the Kylix one based on
> Interfaces, the Kylix one is much easier to understand. You get a
> clear idea of what you need to implement.
If you mean Delphi's HelpIntfs.pas: It merely contains 6 interfaces with 25
methods.
It can only show a TOC and help for ID/Keyword/Topic.
No different mime types, no URLs, no help for messages, source codes, no
configuration data.
The Delphi interface is easier to understand, because it is less.
Have a look at ideintf/helphtml.pas.
It defines a HTML database class and a HTML viewer class.
Most of the code is to handle local and online pages and to make it
customizable in the IDE. A simple application with a local help would only
need one third of the code or even less.
It's pretty simple:
THTMLHelpDatabase defines, that it is capable of handling 'text/html' and a
method to show help for its nodes (ShowHelp). This extracts the help data
and invokes the viewer to show it.
THTMLBrowserHelpViewer defines, that it is capable of showing 'text/html'
and a method to show (ShowNode).
In a simple LCL application it would be sufficient to put everything into
one class. Then you need only one method.
I'm currently looking, what to move into the LCL and for what to put into
pascal interfaces.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives