Pourquoi ne pas compiler? Cela semble simple mais je ne comprends pas ... le tableau de chaîne est-il le problème? L'erreur est:Compléter SelectDirectory troisième surcharge avec Delphi 10
[dcc32 Error] Unit1.pas(94): E2250 There is no overloaded version of 'SelectDirectory' that can be called with these arguments.
Voici le code:
{
function SelectDirectory(const StartDirectory: string; out Directories: TArray<string>; Options: TSelectDirFileDlgOpts = [];
const Title: string = ''; const FolderNameLabel: string = ''; const OkButtonLabel: string = ''): Boolean; overload;
}
procedure TForm2.Browse1Click(Sender: TObject);
var
iStartFolder: string;
iDirectories: Array of string;
iSelectedFolder: string;
begin
iStartFolder := DesktopFolder;
if SelectDirectory(iStartFolder, iDirectories,
[sdHidePinnedPlaces, sdNoDereferenceLinks, sdForceShowHidden,
sdAllowMultiselect], 'Select Folder', 'Folder', 'Ok') then
ShowMessage(iDirectories[0]);
end;
Ok Jason ... tu avais raison. Merci – Bill
Parce que 'TArray' n'est pas le même type que 'Array of string'. –