Sign in Join

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

Mailing lists / lazarus / 2011-11

Documenting constant values

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Hans-Peter Diettrich

Delphi introduces very many constants, corresponding to WinAPI defines. The user has no idea which constants can be used in which place, because the argument types are almost DWORD - TCursor is a nice exception.

Can we agree to define range types or simple type alias for *all* such arguments, so that all related constants can be described together, in one single place? See the documentation on TCursor.

DoDi

Reply by email

Hans-Peter Diettrich
to Felipe Monteiro de Carvalho
I think this should be discussed on a per-API basis. Please give a concrete example.

I gave it already: TCursor.

The generated help links the cursor parameters to the TCursor documentation, for all procedures and methods. Now it's clear, to the user and documentation writer, where the related constants are (to be) documented.

DoDi

Reply by email

Sven Barth
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 10 lines
Felipe Monteiro de Carvalho schrieb: > I think this should be discussed on a per-API basis. Please give a > concrete example. I gave it already: TCursor. The generated help links the cursor parameters to the TCursor documentation, for all procedures and methods. Now it's clear, to the user and documentation writer, where the related constants are (to be) documented.

The problem with this concrete example is that you can easily (at least on Windows) add custom cursors. I don't know whether you have ever done that in Delphi (I haven't), but here is an example I quickly found: http://delphiforfun.org/programs/Delphi_Techniques/CustomCursors.htm

Note: I don't know whether Lazarus supports this.

Regards,
Sven

Reply by email