为什么编译不出来?看起来很简单,但我不明白......是字符串数组的问题吗?错误是:
[dcc32 Error] Unit1.pas(94): E2250 There is no overloaded version of 'SelectDirectory' that can be called with these arguments.
这是代码:
{
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;