Back to product page

Notification property


Fast notification interface to use instead of events.

Type

An IwodFtpNotify object.

Syntax

  • Basic
[Set]object.Notification[= IwodFtpNotify]
The Notification(object,IwodFtpNotify) syntax has these parts:
objectAn expression evaluating to an object of type wodFtpDLXCom.
IwodFtpNotifyAn IwodFtpNotify object. Reference to object that implements this interface.

Remarks

Available only in Component (DLL, windowless) version!

Notification property holds reference to IwodFtpNotify interface that can be implemented by your application. When this property is set, and contains such a reference, wodFtpDLXCom will call your method implementations instead of firing events. More information on how this works can be found here.

For example, instead of having this in your code (VB example):
 
Private Sub Ftp1_Connected(ByVal ErrorCode As Long, ByVal ErrorText As String)
 
End Sub
 

you will have this:
 
Private Sub IwodFtpNotify_Connected(ByVal Owner As wodFtpDLXComLib.IwodFtpDLXCom, ByVal ErrorCode As Long, ByVal ErrorText As String)
 
End Sub
 

pretty much the same - except notification method has one more argument - Owner, which holds reference to wodFtpDLX instance that called this method.

In VB, to implement IwodFtpNotify interface, you need code like this:

- at the top of the code, in section, put this:
 
Dim Ftp As wodFtpDLXCom
Implements IwodFtpNotify
 

- in Form_Load (or where you initialize new instance of wodFtpDLX) do this:
 
Set Ftp = New wodFtpDLXCom
Set Ftp.Notification = Me
Ftp.Protocol = FTP
Ftp.Timeout = 30
Ftp.Connect
...
 

You can notice that when we declared Ftp, we did not use WithEvents keyword - it is not needed anymore, because events will not be fired anymore. Notification methods we implement will be called instead!

Platforms

Windows