From: SourceForge.net <no...@so...> - 2008-07-17 15:32:47
|
Bugs item #2020694, was opened at 2008-07-17 10:05 Message generated for change (Comment added) made by wdashley You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=2020694&group_id=119701 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Classes Group: None Status: Closed Resolution: Invalid Priority: 5 Private: No Submitted By: Flemming Pihl Knudsen (fpknudsen) Assigned to: Nobody/Anonymous (nobody) Summary: Problems with RxFtp Response method Initial Comment: What do I do wrong when I try to access the Response array. Please answer to fp...@ho... This is the actual part of the text code: RC = myftp~FtpChDir("udbakke"); IF RC > 0 THEN DO; SAY "FEJL I CH DIR" RC; END; RC = myftp~FtpLs IF myftp~response <> .nil THEN DO SAY "items is " myftp~response~items; DO I = 1 TO myftp~response~items; SAY myftp~response(I); END; END; ----------------------------------------------- Running the the code gives the following result: SYST 38 *-* IF RC > 0 45 *-* RC = myftp~FtpChDir("udbakke"); CWD udbakke 46 *-* IF RC > 0 50 *-* RC = myftp~FtpLs PASV NLST ./* 53 *-* IF myftp~response <> .nil 53 *-* THEN 53 *-* DO 56 *-* SAY "items is " myftp~response~items; items is 2 58 *-* DO I = 1 TO myftp~response~items; 59 *-* SAY myftp~response(I); 59 *-* SAY myftp~response(I); Error 93 running H:\DRIFTSPROCEDURER\DBD\fpkftprexx.cmd line 59: Incorrect call to method Error 93.902: Too many arguments in invocation of method; 0 expected ------------------------------- The Ftp Trace log look like this: 220 FTPManager - please login... USER ************************ 331 Password required for ***************************** PASS XXXX 230 User ************************* logged in SYST 215 UNIX Type: L8 CWD udbakke 250 CWD command successful PASV 227 Entering Passive Mode (*************). NLST ./* 150 Opening ASCII mode data connection for file list 226 Transfer complete ---------------------------------------------------------------------- >Comment By: David Ashley (wdashley) Date: 2008-07-17 10:32 Message: Logged In: YES user_id=931756 Originator: NO The problem here is that you are testing for the wrong RC value. IF RC > 0 THEN DO; This statement should be IF RC <> 0 THEN DO; In this case RC has a value of -1 on an error and zero otherwise. ---------------------------------------------------------------------- Comment By: Mark Miesfeld (miesfeld) Date: 2008-07-17 10:15 Message: Logged In: YES user_id=191588 Originator: NO This isn't a bug, your code is incorrect. You would do better to ask for help, rather than open a bug. You could use one of the project forums, or even ask the question on the developer list. DO I = 1 TO myftp~response~items; SAY myftp~response(I); END; The repsonse attribute is an array. You don't use () to access an array item, you use brackets. DO I = 1 TO myftp~response~items; SAY myftp~response[I]; END; ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=2020694&group_id=119701 |