Justin Hewitt
New Member
Folks.
Is anyone outhere using the Mabry FTP/X Com+ Object
from the CHUI?
I have downloaded the sample ftp/X object & have been playing with some sample code in a dev session.
The methods & properties are working as expected;
However, I cannot get the event procedures to fire.
sample code
----------------------------------------------------
def var ii as int.
def var xx as int.
def var aa as char.
def var ftpx as com-handle.
create "Mabry.FtpXObj.1" ftpx no-error.
ftpx:enable-events("ftpXEvent").
ftpx:debugmode = 1.
ftpx:Blocking = true.
ftpx:Host = "127.0.0.1".
ftpx:LogonName = "anonymous".
ftpx:LogonPassword = "you@yourdomain.com".
ftpx:connect no-error.
ftpx:licensekey = "kjdsjkkjdjw".
ftpx:diritempattern = "DddSN".
ftpxarentdir.
ftpxattern = "" no-error.
ftpx:getfilenamelist no-error.
ii = ftpx:diritems no-error.
do xx = 0 to (ii - 1):
assign
aa = trim(ftpx:diritem(xx))
.
display
ftpx:statestring format "x(30)"
aa format "x(60)"
with width 80 no-labels.
/*
ftpx:type = 1.
ftpx:srcfilename = aa.
ftpx:dstfilename = "c:\hello".
ftpx:getfile.
*/
end.
ftpx:disconnect.
PROCEDURE ftpXEvent.Connected:
display "Connected Event Triggered". pause.
END PROCEDURE.
PROCEDURE ftpXEvent.DirItem:
DEFINE INPUT PARAMETER Item AS CHARACTER.
display "Directory Item Triggered" item . pause.
END PROCEDURE.
PROCEDURE ftpXEvent.Progress :
DEFINE INPUT PARAMETER BytesTransfered AS INTEGER.
display "progress". pause.
END PROCEDURE.
-----------------------------------------------------------
The (display statestring) is showing the files in the FTP servers parent folder correctly.
I was though expecting the (FTPXEvent) procedures to also fire.
As this is my first attempt at hooking com+ events, I may be making a beginners mistake ..
Any assistance appreciated.
regards
Is anyone outhere using the Mabry FTP/X Com+ Object
from the CHUI?
I have downloaded the sample ftp/X object & have been playing with some sample code in a dev session.
The methods & properties are working as expected;
However, I cannot get the event procedures to fire.
sample code
----------------------------------------------------
def var ii as int.
def var xx as int.
def var aa as char.
def var ftpx as com-handle.
create "Mabry.FtpXObj.1" ftpx no-error.
ftpx:enable-events("ftpXEvent").
ftpx:debugmode = 1.
ftpx:Blocking = true.
ftpx:Host = "127.0.0.1".
ftpx:LogonName = "anonymous".
ftpx:LogonPassword = "you@yourdomain.com".
ftpx:connect no-error.
ftpx:licensekey = "kjdsjkkjdjw".
ftpx:diritempattern = "DddSN".
ftpxarentdir.
ftpxattern = "" no-error.
ftpx:getfilenamelist no-error.
ii = ftpx:diritems no-error.
do xx = 0 to (ii - 1):
assign
aa = trim(ftpx:diritem(xx))
.
display
ftpx:statestring format "x(30)"
aa format "x(60)"
with width 80 no-labels.
/*
ftpx:type = 1.
ftpx:srcfilename = aa.
ftpx:dstfilename = "c:\hello".
ftpx:getfile.
*/
end.
ftpx:disconnect.
PROCEDURE ftpXEvent.Connected:
display "Connected Event Triggered". pause.
END PROCEDURE.
PROCEDURE ftpXEvent.DirItem:
DEFINE INPUT PARAMETER Item AS CHARACTER.
display "Directory Item Triggered" item . pause.
END PROCEDURE.
PROCEDURE ftpXEvent.Progress :
DEFINE INPUT PARAMETER BytesTransfered AS INTEGER.
display "progress". pause.
END PROCEDURE.
-----------------------------------------------------------
The (display statestring) is showing the files in the FTP servers parent folder correctly.
I was though expecting the (FTPXEvent) procedures to also fire.
As this is my first attempt at hooking com+ events, I may be making a beginners mistake ..
Any assistance appreciated.
regards