Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-12

fpdoc and linked elements

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi Michael (or anybody else that could help),

I'm using fpdoc from FPC 2.7.1 (pulled yesterday from the repository).

I have a xml description file with the following elements.

----------[ fpg_button.xml ]-----------------

<element name="TfpgButton.ImageName" link="TfpgBaseButton.ImageName"/> <element name="TfpgButton.ImageSpacing"
link="fpg_button.TfpgBaseButton.ImageSpacing"/>

---------------[ end ]---------------

What is the correct format for the link attribute?

The first one (for ImageName property) which doesn't list the unit name in the link attribute, is never found by fpdoc. So the generated documentation ends up being blank. The second one where I explicitly mention the unit name, fpdoc does find the linked element, and correct documentation is generated.

So I gather I am always supposed to use the syntax:

<unitname>.<class>.<property>

What is strange, and I still can't find the issue in fpdoc, is that sometimes both syntax works. eg: yesterday I generated documentation and all linked docs worked. Today it doesn't.

I've also stepped through the TFPDocEngine.FindDocNode() implementation, and when it gets to the iteration of the "uses lists", it only iterations 3 units, but fpg_button.pas there are 6 units listed in the interface section's uses clause.

Also in the FindLinkedNode(), where it calls

      FindDocNode(CurModule,ANode.Link);

for ANode = TfpgButton.ImageName, the CurModule is pointing to the unit fpg_colorwheel.pas??? No wonder it never finds the TfpgBaseButton.ImageName element. Something seems seriously wrong in fpdoc somewhere.

Regards,
- Graeme -

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 13 lines
Hi Michael (or anybody else that could help), I have a xml description file with the following elements. The first one (for ImageName property) which doesn't list the unit name in the link attribute, is never found by fpdoc. So the generated documentation ends up being blank. The second one where I explicitly mention the unit name, fpdoc does find the linked element, and correct documentation is generated. So I gather I am always supposed to use the syntax: <unitname>.<class>.<property>

Normally, there are 2 syntaxes:

#package.unit.class.property

and

class.property

Show quoted text 17 lines
What is strange, and I still can't find the issue in fpdoc, is that sometimes both syntax works. eg: yesterday I generated documentation and all linked docs worked. Today it doesn't. I've also stepped through the TFPDocEngine.FindDocNode() implementation, and when it gets to the iteration of the "uses lists", it only iterations 3 units, but fpg_button.pas there are 6 units listed in the interface section's uses clause. Also in the FindLinkedNode(), where it calls FindDocNode(CurModule,ANode.Link); for ANode = TfpgButton.ImageName, the CurModule is pointing to the unit fpg_colorwheel.pas??? No wonder it never finds the TfpgBaseButton.ImageName element. Something seems seriously wrong in fpdoc somewhere.

Well, I've had some issues myself, but never managed to pinpoint the exact reason. Somehow, when trying to construct test cases, the problem does not pop up: it proves to be very elusive.

Michael.

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
Well, I've had some issues myself, but never managed to pinpoint the exact reason. Somehow, when trying to construct test cases, the problem does not pop up: it proves to be very elusive.

I'll dig deeper and see what I can find. This bug is very annoying in my docs.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/