[fpc-devel] [PATCH] for fpdoc docs

2007-12-23 Thread Andrew Haines
Hi,

I added to the docs imformation on the chm part of fpdoc.

There are five or six options I would like to document better than the
short description --help --format=chm gives, where should they go in
fpdoc.tex?

Regards,

Andrew
Index: fpdoc.tex
===
--- fpdoc.tex   (revision 345)
+++ fpdoc.tex   (working copy)
@@ -110,6 +110,7 @@
 \item[Man] Unix man pages. Each function/procedure/method identifier is a man
 page. Constants are on a separate page, as are types, variables and
 resourcestrings.
+\item[CHM] HTML files compressed into a .chm file using lzx compression.
 \end{description}
 Plans exist to create direct RTF output as well.
 
@@ -342,6 +343,7 @@
 \item[latex] LaTex, which uses the \file{fpc.sty} style used by the \fpc
 documentation. 
 \item[xml-struct] Structured XML.
+\item[chm] Compressed HTML.
 \end{description}
 
 % help
@@ -408,6 +410,14 @@
 directory. Inside the subdirectory, commands as the above could be used to
 provide links to other documentation packages.
 
+Example:
+\begin{verbatim}
+--import=../fcl.cnt,ms-its:fcl.chm::/
+\end{verbatim}
+As in the previous example this will read the file fcl.cnt in the parent 
+directory. But all links to items in the fcl.cnt file, will be prepended 
+with \file{ms-its:fcl.chm::/}. This is how chm's are crosslinked.
+
 Note that for Latex documentation, this option is ignored.
 
 % input
@@ -462,6 +472,7 @@
 This option tells  \fpdoc where the output file should be generated. 
 How this option is interpreted depends on the format that is used. 
 For latex, this is interpreted as the filename for the tex file. 
+For chm, this is interpreted as the output filename.
 For all other formats, this is interpreted as the directory where all 
 documentation files will be written. The directory will be created if 
 it does not yet exist.
@@ -478,6 +489,10 @@
 --format=latex --output=docs/classes.tex
 \end{verbatim}
 will generate latex documentation in the file \file{docs/classes}.
+\begin{verbatim}
+--format=chm --output=docs.chm
+\end{verbatim}
+will generate chm documentation in the file \file{docs.chm}.
 
 % package
 \subsection{package}
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] [PATCH] for fpdoc docs

2007-12-23 Thread Michael Van Canneyt


On Sun, 23 Dec 2007, Andrew Haines wrote:

> Hi,
> 
> I added to the docs imformation on the chm part of fpdoc.

Applied, thanks.

> 
> There are five or six options I would like to document better than the
> short description --help --format=chm gives, where should they go in
> fpdoc.tex?

Section 3.2, 'FPDoc command-line options reference'.
a subsection per option.

Please create also a CHM section for 'Generated output files'. It need not be 
long,
but should explain what happens when generating chm.

Thanks !

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] 0010465: CsSubComponent component properties not streamed

2007-12-23 Thread Martin Schreiber
Hi,

Michael Van Canneyt marked my bugreport 10465 with "won't fix", I would like 
to discuss the issue in a broader forum.
With fixes_2_2 rev. 9006 FPC does not stream published component properties 
where the component has CsSubComponent set if the property component is not 
owned by the streamed component.
Delphi streams CsSubComponent properties independent of ownership.
Caused by this change some properties of MSEgui components will be deleted if 
MSEide is compiled with fixes_2_2 >= rev 9006, the users will loose data.
Sometimes I use in MSEgui components as worker objects in other components 
which should behave as simple TPersistent descendants and not be integrated 
in the ownership system. I achieve the wanted behaviour by creating them with 
a NIL AOwner parameter.
An example is tsocketclientiochannel where I use a tifisocketclient component 
with CsSubComponent set in order to implement the socket functionality and to 
allow the user to do the socket settings by the object inspector of MSEide.
Michaels change now forbid this method although it is completely legal in 
Delphi.

Now I have several possibilities:

1. I can accept Michaels verdict and surrender to use my programming method 
and rewrite the affected MSEgui pieces and introduce an incompatibility with 
current MSEgui projects.

2. I can spend some hours or days and try to convince Michael that he should 
allow some more freedom how to use his components.

3. I can fork on classes.pp level. No problem for me but no fun for MSEgui 
users who want to combine MSEgui components with foreign components.

What shall I do?

Martin
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] 0010465: CsSubComponent component properties not streamed

2007-12-23 Thread Florian Klaempfl
Martin Schreiber schrieb:
> Hi,
> 
> Michael Van Canneyt marked my bugreport 10465 with "won't fix", I would like 
> to discuss the issue in a broader forum.
> With fixes_2_2 rev. 9006 FPC does not stream published component properties 
> where the component has CsSubComponent set if the property component is not 
> owned by the streamed component.
> Delphi streams CsSubComponent properties independent of ownership.

What was the reason for the change?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] 0010465: CsSubComponent component properties not streamed

2007-12-23 Thread Michael Van Canneyt


On Sun, 23 Dec 2007, Florian Klaempfl wrote:

> Martin Schreiber schrieb:
> > Hi,
> > 
> > Michael Van Canneyt marked my bugreport 10465 with "won't fix", I would 
> > like 
> > to discuss the issue in a broader forum.
> > With fixes_2_2 rev. 9006 FPC does not stream published component properties 
> > where the component has CsSubComponent set if the property component is not 
> > owned by the streamed component.
> > Delphi streams CsSubComponent properties independent of ownership.
> 
> What was the reason for the change?

The reason is that Delphi-compatible cannot handle references to subcomponents. 
This 'bug' was fixed during systems by me and Mattias Gaertner.

In particular:

Consider the ActiveControl property of TForm.
The Lazarus TButtonPanel component has buttons as subcomponents (OKButton, 
CancelButton etc). 

When the ActiveControl property of the form is set to one of these buttons, 
then the old, 
delphi-compatible code would stream the whole OKButton as ActiveControl. 

This is of course wrong, only a reference to OKButton should be streamed. This 
is a bug in 
the Delphi streaming mechanism: it cannot correctly handle references to 
subcomponents.

The OKButton should only be streamed as part of TButtonPanel, not when some 
other component
references it. The bugfix makes sure this is so, by checking the owner of the 
subcomponent: 
if this is the same as the instance being streamed (the ButtonPanel instance in 
this case), 
then the subcomponent is streamed, otherwise a reference is streamed.

All Martin has to do is make sure his subcomponent is owned by the component it 
is a subcomponent 
of, and his code will function correctly. Since his sample code uses nil as 
owner, this is a minor
- and Delphi-compatible - change IMHO.

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] 0010465: CsSubComponent component properties not streamed

2007-12-23 Thread Michael Van Canneyt


On Sun, 23 Dec 2007, Martin Schreiber wrote:

> Hi,
> 
> Michael Van Canneyt marked my bugreport 10465 with "won't fix", I would like 
> to discuss the issue in a broader forum.
> With fixes_2_2 rev. 9006 FPC does not stream published component properties 
> where the component has CsSubComponent set if the property component is not 
> owned by the streamed component.
> Delphi streams CsSubComponent properties independent of ownership.
> Caused by this change some properties of MSEgui components will be deleted if 
> MSEide is compiled with fixes_2_2 >= rev 9006, the users will loose data.
> Sometimes I use in MSEgui components as worker objects in other components 
> which should behave as simple TPersistent descendants and not be integrated 
> in the ownership system. I achieve the wanted behaviour by creating them with 
> a NIL AOwner parameter.
> An example is tsocketclientiochannel where I use a tifisocketclient component 
> with CsSubComponent set in order to implement the socket functionality and to 
> allow the user to do the socket settings by the object inspector of MSEide.
> Michaels change now forbid this method although it is completely legal in 
> Delphi.
> 
> Now I have several possibilities:
> 
> 1. I can accept Michaels verdict and surrender to use my programming method 
> and rewrite the affected MSEgui pieces and introduce an incompatibility with 
> current MSEgui projects.

There is no incompatibility:
Just replace the Nil with the owner. Your code will function as it was.

The Owner-Owned relation is in no other location used during streaming, 
so you should not worry about that.

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] 0010465: CsSubComponent component properties not streamed

2007-12-23 Thread Michael Van Canneyt


On Sun, 23 Dec 2007, Michael Van Canneyt wrote:

> 
> 
> On Sun, 23 Dec 2007, Florian Klaempfl wrote:
> 
> > Martin Schreiber schrieb:
> > > Hi,
> > > 
> > > Michael Van Canneyt marked my bugreport 10465 with "won't fix", I would 
> > > like 
> > > to discuss the issue in a broader forum.
> > > With fixes_2_2 rev. 9006 FPC does not stream published component 
> > > properties 
> > > where the component has CsSubComponent set if the property component is 
> > > not 
> > > owned by the streamed component.
> > > Delphi streams CsSubComponent properties independent of ownership.
> > 
> > What was the reason for the change?
> 
> The reason is that Delphi-compatible cannot handle references to 
> subcomponents. 
> This 'bug' was fixed during systems by me and Mattias Gaertner.

BTW. 

I have Delphi code that shows the bug, if you want, so maybe Martin can
submit a bugreport at Codegear for a change :-)

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel