Board index » delphi » Stupid FTP Problems

Stupid FTP Problems

Procedure Tserverconnectform.connecttoserver;
begin
  ActualMainForm.NMFTP1.Host := ServerHostDisplay.text;
  ActualMainForm.NMFTP1.Port := Strtoint(Serverportdisplay.text);
  ActualMainForm.NMFTP1.TimeOut :=  600000;
  ActualMainForm.NMFTP1.UserID := ServerUserDisplay.text;
  ActualMainForm.NMFTP1.Password := Serverpassworddisplay.text;
  ActualMainForm.NMFTP1.Connect;
 end;

procedure TActualMainForm.DIRListButtonClick(Sender: TObject);
begin
J:=1;
NMFTP1.Nlist;
end;

procedure TActualMainForm.NMFTP1ListItem(Listing: String);
begin
  DIRListDisplay.Lines.Add(IntToStr(J)+': '+Listing);
  Inc(J);
end;

Where J is a declared Global Integer, now what is wrong with that? Produces
no errors at all but jus will not list items - every conceivable component
enabled, listing a local (127.0.0.1) FTP - newbie just not understanding
:( P.S. My FTP server even shows the NLIST request was sent and the ftp demo
will download the list, so why not my version?

--
Blade

 

Re:Stupid FTP Problems


Those NetMaster components are very buggy and most people do not use them.
A much better set of internet components is ICS, which you can get at:

http://overbyte.alexid.fr/eng/main.html

Quote
"Blade" <Rogue_Spear3...@hotmail.com> wrote in message

news:9id2qs$ht5ei$1@ID-96325.news.dfncis.de...
Quote
> Procedure Tserverconnectform.connecttoserver;
> begin
>   ActualMainForm.NMFTP1.Host := ServerHostDisplay.text;
>   ActualMainForm.NMFTP1.Port := Strtoint(Serverportdisplay.text);
>   ActualMainForm.NMFTP1.TimeOut :=  600000;
>   ActualMainForm.NMFTP1.UserID := ServerUserDisplay.text;
>   ActualMainForm.NMFTP1.Password := Serverpassworddisplay.text;
>   ActualMainForm.NMFTP1.Connect;
>  end;

> procedure TActualMainForm.DIRListButtonClick(Sender: TObject);
> begin
> J:=1;
> NMFTP1.Nlist;
> end;

> procedure TActualMainForm.NMFTP1ListItem(Listing: String);
> begin
>   DIRListDisplay.Lines.Add(IntToStr(J)+': '+Listing);
>   Inc(J);
> end;

> Where J is a declared Global Integer, now what is wrong with that?
Produces
> no errors at all but jus will not list items - every conceivable component
> enabled, listing a local (127.0.0.1) FTP - newbie just not understanding
> :( P.S. My FTP server even shows the NLIST request was sent and the ftp
demo
> will download the list, so why not my version?

> --
> Blade

Re:Stupid FTP Problems


Ummm. I use this stuff with code that looks pretty much like yours and
it works fine. Only thing I can think of is to make sure that
FTPListItem is actually set as your List event handler .....

Bogeyman

Quote
"Blade" <Rogue_Spear3...@hotmail.com> wrote:
>Procedure Tserverconnectform.connecttoserver;
>begin
>  ActualMainForm.NMFTP1.Host := ServerHostDisplay.text;
>  ActualMainForm.NMFTP1.Port := Strtoint(Serverportdisplay.text);
>  ActualMainForm.NMFTP1.TimeOut :=  600000;
>  ActualMainForm.NMFTP1.UserID := ServerUserDisplay.text;
>  ActualMainForm.NMFTP1.Password := Serverpassworddisplay.text;
>  ActualMainForm.NMFTP1.Connect;
> end;

>procedure TActualMainForm.DIRListButtonClick(Sender: TObject);
>begin
>J:=1;
>NMFTP1.Nlist;
>end;

>procedure TActualMainForm.NMFTP1ListItem(Listing: String);
>begin
>  DIRListDisplay.Lines.Add(IntToStr(J)+': '+Listing);
>  Inc(J);
>end;

>Where J is a declared Global Integer, now what is wrong with that? Produces
>no errors at all but jus will not list items - every conceivable component
>enabled, listing a local (127.0.0.1) FTP - newbie just not understanding
>:( P.S. My FTP server even shows the NLIST request was sent and the ftp demo
>will download the list, so why not my version?

>--
>Blade

Other Threads