我的程序代码是这样的:
procedure tform1.popclick(sender:tobject);
var 
i:integer;
begin
      nmftp1.nList;
      i:=nmftp1.FTPDirectoryList.name.count;
end;
但是总是出现这样的错误!
Access violation at address 00474b1 in module 'ftp.exe'. read of address 000000010
请赐教!

解决方案 »

  1.   

    The FTPDirectoryList property is used only when the ParseList property is set to TRUE.
    FTPDirectoryList contains the directory listing obtained from the List method, with each of the elements of the listing separated into properties. See the TFTPDirectoryList object reference for details on the properties of this object.
      

  2.   

    我把parselist设为true了,还是不行!
      

  3.   

    NMFTP1.ParseList := True;
      NMFTP1.List;
    i:=nmftp1.FTPDirectoryList.name.count;