[Lazarus] Compile conditionals from Delphi do not work in Laz 1.6...

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Jul 22 12:26:39 CEST 2016


On 2016-07-22 11:17, Mattias Gaertner wrote:
> TSelectDirectoryDialog is a specialized TOpenDialog.
> 
> TSelectDirectoryDialog = class(TOpenDialog)
> TOpenDialog = class(TFileDialog)
> TFileDialog = class(TCommonDialog)

I know all that, I checked before I replied. My point is you have a
DIRECTORY select dialog, but you have to use a Filename property to
retrieve the selected Directory Name. Makes no sense.

If you must use the TFileDialog functionality, then at least add another
class in the hierarchy (eg: TCustomFileDialog) where properties like
"DefaultExt", "FileName", "Files" etc are not published. Then
TSelectDirectoryDialog can descend from that, and then publish a
"Directory" and "DirectoryList" (if multiple directory selection is
supported) properties which internally reads the Filename value.

As it is now, the usage is messy.

Regards,
  Graeme



More information about the Lazarus mailing list