線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1384
推到 Plurk!
推到 Facebook!

NMFTP-連按2次button會有錯誤發生

尚未結案
lydiae36
一般會員


發表:1
回覆:0
積分:0
註冊:2005-09-15

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-10-03 15:14:28 IP:61.222.xxx.xxx 未訂閱
我是個新手....    先查看是否有目錄edit1.text名稱 再進入edit1.text目錄裡查看是否有檔案 如果有就button.enabled=true 按button後就可以開啟檔案    慢慢按都沒問題 但是!!我如果快速按speedbutton1兩下的話,會發生此錯誤 Debugger Exception Notification project Cqr_eis.exe raised exception class EAcessViolation with message 'Assess violation at address 004A9748 in module 'Cqr_eis.exe'.Read of address 0000001C'.Process stopped.Use Step or Run to continue. 錯誤的地方機乎都會會停在 nmftp1.nlist上面    procedure Tfmdetail.SpeedButton1Click(Sender: TObject); begin  NMFTP1.Host := 'xxxxxxxx';   NMFTP1.Port := 21;   NMFTP1.TimeOut :=20000;   NMFTP1.UserID := 'user';   NMFTP1.Password := '12345';   nmftp1.changedir('/CQR/');   list1:=False; //預設為false;   b1:=False;  //button是否要顯示,無檔案則為不顯示false   b2:=False;   b3:=False;   b4:=False;     code:=1;     NMFTP1.nlist;  執行在listing裡為1的那一段,得知是否有目錄   if code=2 then begin    // code:=2;  //button1     nmftp1.nlist;  得知是否有檔案   end   else     begin     button1.enabled:=false;     button2.enabled:=false;     button3.enabled:=false;     button4.enabled:=false;     end; end;    procedure Tfmdetail.NMFTP1ListItem(Listing: String); begin    if  code=1 then begin      if MatchesMask(listing,trim(edit1.text))=true then begin        list1:=true;        code:=2;        nmftp1.changedir('/CQR/'+trim(edit1.text));  //查看是否有此目錄存在      end;    end;     if code=2 then begin       if MatchesMask(listing,trim(edit1.text)+'CMP.*')=true then //找出是否有檔名存在         b1:=true;       if MatchesMask(listing,trim(edit1.text)+'OTH.*')=true then         b2:=true;       if MatchesMask(listing,qcno+'.*')=true then         b3:=true;       if MatchesMask(listing,qcno+'OTH.*')=true then         b4:=true;       if b1=false then         button1.enabled:=false       else         button1.enabled:=true;       if b2=false then         button2.enabled:=false       else         button2.enabled:=true;       if b3=false then         button3.enabled:=false       else         button3.enabled:=true;       if b4=false then         button4.enabled:=false       else         button4.enabled:=true     end;        if code=11 then begin       if MatchesMask(listing,trim(edit1.text)+'CMP.*')=true then begin         fmie := Tfmie.create(self);          //存在則開啟         uinternet.filepath:='ftp://xxxxxx'+trim(edit1.text)+'/'+listing;         fmie.ShowModal;         fmie.free;       end;     end;     if code=12 then begin       if MatchesMask(listing,trim(edit1.text)+'OTH.*')=true then begin         fmie := Tfmie.create(self);         uinternet.filepath:='ftp://xxxxxxxx'+trim(edit1.text)+'/'+listing;         fmie.ShowModal;         fmie.free;       end;     end;     if code=13 then begin       if MatchesMask(listing,qcno+'.*')=true then begin         fmie := Tfmie.create(self);         uinternet.filepath:='ftp://xxxxxxxxx'+trim(edit1.text)+'/'+listing;         fmie.ShowModal;         fmie.free;       end;     end;     if code=14 then begin       if MatchesMask(listing,qcno+'OTH.*')=true then begin         fmie := Tfmie.create(self);         uinternet.filepath:='ftp://xxxxxxx'+trim(edit1.text)+'/'+listing;         fmie.ShowModal;         fmie.free;         end;     end
Ktop_Robot
站務副站長


發表:0
回覆:3511
積分:0
註冊:2007-04-17

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-04-26 13:50:31 IP:000.000.xxx.xxx 未訂閱
提問者您好:


以上回應是否已得到滿意的答覆?


若已得到滿意的答覆,請在一週內結案,否則請在一週內回覆還有什麼未盡事宜,不然,
將由版主(尚無版主之區域將由副站長或站長)自由心證,選擇較合適之解答予以結案處理,
被選上之答題者同樣會有加分獎勵同時發問者將受到扣 1 分的處分。不便之處,請見諒。


有問有答有結案,才能有良性的互動,良好的討論環境需要大家共同維護,感謝您的配合。

------
我是機器人,我不接受簡訊.
系統時間:2024-05-10 14:54:55
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!