Recent

Author Topic: Hints for method name missing comments  (Read 2219 times)

dsiders

  • Hero Member
  • *****
  • Posts: 1453
Re: Hints for method name missing comments
« Reply #15 on: June 22, 2025, 02:34:35 am »

Glad it's solved... but I'm confused.
Why does a variable declared as Boolean not default to False?
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

CM630

  • Hero Member
  • *****
  • Posts: 1436
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Hints for method name missing comments
« Reply #16 on: June 22, 2025, 08:01:34 am »
Yep, you have fixed it Juha, now works as it should !  Once again, I thank you !

Lets hear from CM630 ?
...
Sorry, I did not understand what I shall say or do?
Лазар 4,0 32 bit (sometimes 64 bit); FPC3,2,2

dbannon

  • Hero Member
  • *****
  • Posts: 3410
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Hints for method name missing comments
« Reply #17 on: June 22, 2025, 08:38:35 am »

Sorry, I did not understand what I shall say or do?
[/quote]

I'm wondering if that solves https://forum.lazarus.freepascal.org/index.php/topic,70369.msg548794.html#msg548794

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 3410
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Hints for method name missing comments
« Reply #18 on: June 22, 2025, 08:44:53 am »

Glad it's solved... but I'm confused.
Why does a variable declared as Boolean not default to False?

No default is applied if its declared in a method as I understand it.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

CM630

  • Hero Member
  • *****
  • Posts: 1436
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Hints for method name missing comments
« Reply #19 on: June 22, 2025, 10:35:52 am »
I'm wondering if that solves https://forum.lazarus.freepascal.org/index.php/topic,70369.msg548794.html#msg548794
Hm, how could I test it?
Run FCUPDeluxe, select FPC Version = Trunk, Lazarus Version = fixes-4.0 , the press Install / update FPC + Lazarus?

...
I fixed it in 95eaa30d4e. Please test. I merged it to fixes_4.
No idea what the bold things mean, so I am guessing.
« Last Edit: June 22, 2025, 10:37:55 am by CM630 »
Лазар 4,0 32 bit (sometimes 64 bit); FPC3,2,2

dbannon

  • Hero Member
  • *****
  • Posts: 3410
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Hints for method name missing comments
« Reply #20 on: June 22, 2025, 12:50:07 pm »
Sorry CM, was not trying to get you to do things outside your comfort zone.

Yep, fpupdeluxe would work if you like that. Would you consider using that rather than your existing install in future ?   If not, maybe its not worth the effort ?  Your call.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

CM630

  • Hero Member
  • *****
  • Posts: 1436
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Hints for method name missing comments
« Reply #21 on: June 23, 2025, 07:55:47 am »
Lazarus 4.1 (rev lazarus_4_0-77-gc52a98dba2) FPC 3.3.1 i386-win32-win32/win64
Trying to compile my control, that builds in Lazarus 4.0.
I get :
scales.pas(99,31) Error: This kind of property cannot be published for   
Code: Pascal  [Select][+][-]
  1.   property Format : TFormat read FDisplayFormat write SetDisplayFormat;
in:
Code: Pascal  [Select][+][-]
  1. TDisplayFormat = class(TPersistent)
  2.   private
  3.     FParent : TWinControl;
  4.  
  5.     FDisplayFormat: TFormat;
  6.     FPrecision : UInt8;
  7.   public
  8.     constructor Create(aParent: TWinControl); //override;
  9.     destructor Destroy; override;
  10.     procedure SetDisplayFormat(Value: TFormat);
  11.     procedure SetPrecision(Value: UInt8);
  12.   published
  13.     property Format : TFormat read FDisplayFormat write SetDisplayFormat;
  14.     property Precision : UInt8 read FPrecision write SetPrecision;
  15. end;    

TFormat is   
Code: Pascal  [Select][+][-]
  1. TFormat =              (FloatingPoint = 0, Scientific = 1, Binary = 3, Octal = 4, Hexadecimal = 5, RelativeTime = 6, AbsoluteTime = 7, SINotattion = 8, AutomaticFormatting = 9, Decimal = 9);


Then I tried TLazSerial, added comments for two properties (one with a space after // and another without a space), and they are shown, so the issue seems to be fixed (see the image attached).

Another oddity that I noticed is that loading APKs is very slow (the time from selecting an LPK from the file dialogue until the LPK window is shown).
« Last Edit: June 23, 2025, 08:23:15 am by CM630 »
Лазар 4,0 32 bit (sometimes 64 bit); FPC3,2,2

MarkMLl

  • Hero Member
  • *****
  • Posts: 8453
Re: Hints for method name missing comments
« Reply #22 on: June 24, 2025, 09:41:41 pm »
edit : wow, that issue has a history !  Your persistence paid off Juha.

Regrettably, I'll have to leave my unit generator at https://github.com/MarkMLl/dynamod unchanged since it is going to be a very long time before it's safe to assume that the average Github user is on a fully-fixed v4.

I know that I'm being reactionary (or something) here, but if I publish Pascal code I want it to be usable by anybody, not just by those committed enough to ignore the version of Lazarus made available by their distro/store and work out how to use the very latest version published by the Lazarus project itself.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MarkMLl

  • Hero Member
  • *****
  • Posts: 8453
Re: Hints for method name missing comments
« Reply #23 on: June 24, 2025, 09:46:04 pm »
Martin no, I am not using fpdoc. And my problem is not duplicate comments, its no comments !

OK, particularly noting the machine-generated example at https://forum.lazarus.freepascal.org/index.php/topic,71559.msg558705/topicseen.html this looks like something I need to be aware of. Where is the markup format documented?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

dsiders

  • Hero Member
  • *****
  • Posts: 1453
Re: Hints for method name missing comments
« Reply #24 on: June 24, 2025, 10:17:23 pm »
Martin no, I am not using fpdoc. And my problem is not duplicate comments, its no comments !

OK, particularly noting the machine-generated example at https://forum.lazarus.freepascal.org/index.php/topic,71559.msg558705/topicseen.html this looks like something I need to be aware of. Where is the markup format documented?

MarkMLl

What markup format? It's a comment.

The example you point to is not fpdoc tagging... even though it says it is. It pidgin PasDoc, and fpdoc knows nothing about PasDoc. So unless you're using PasDoc and not FPDoc to generate help... there is no markup for in-source comments.
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4599
  • I like bugs.
Re: Hints for method name missing comments
« Reply #25 on: June 25, 2025, 06:09:29 am »
I fixed it in 95eaa30d4e. Please test. I merged it to fixes_4.
No idea what the bold things mean, so I am guessing.
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/95eaa30d4e183636f12e791128ea983d5605cfb0
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/59d8be35fd76497695f64d2722a4ec499bcbbadd

Regrettably, I'll have to leave my unit generator at https://github.com/MarkMLl/dynamod unchanged since it is going to be a very long time before it's safe to assume that the average Github user is on a fully-fixed v4.
How is that related to the comment hints?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8453
Re: Hints for method name missing comments
« Reply #26 on: June 25, 2025, 09:35:04 am »
Regrettably, I'll have to leave my unit generator at https://github.com/MarkMLl/dynamod unchanged since it is going to be a very long time before it's safe to assume that the average Github user is on a fully-fixed v4.
How is that related to the comment hints?

An earlier posting queried fpdoc

Maybe https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/14384

Though yours don't seem to have fpdoc info...

which I assumed related to markup in comments relating to parameters and return value.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4599
  • I like bugs.
Re: Hints for method name missing comments
« Reply #27 on: June 25, 2025, 10:37:41 am »
which I assumed related to markup in comments relating to parameters and return value.
Ah, OK.
No markup there. The comment shown in a hint is kind of a fallback plan when there is no fpdoc XML documentation.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8453
Re: Hints for method name missing comments
« Reply #28 on: June 25, 2025, 10:54:04 am »
No markup there. The comment shown in a hint is kind of a fallback plan when there is no fpdoc XML documentation.

The comment-used-as-hint I obviously knew about. But from the link I posted https://forum.lazarus.freepascal.org/index.php/topic,71559.msg558705/topicseen.html I assumed that there was a very small amount of internal markup... or was that related strictly to his project?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018