E
Exch
Hello, I need a little help about Delegates, that I am using right now
for first time. I have a web control used in a form. Id like to pass
to this control a function pointer.
In the web control, I have defined a delegate and I have created a
variable of this type:
Public Delegate Sub SQLDisponibileToAttivo(ByVal
lintCodTipologiaInformazione As Integer)
Public F_SQLDisponibileToAttivo As SQLDisponibileToAttivo
Some lines after, in a sub, I invoke the delegate:
F_SQLDisponibileToAttivo.Invoke(1)
In the form in which is defined the web control, I try to pass the
function to the delegate:
Dim objFrequenzeTemporali_Controller As New
FrequenzeTemporali_Controller
dlaFrequenzeTemporali.F_SQLDisponibileToAttivo = New
DualListAdvanced.SQLDisponibileToAttivo(AddressOf
objFrequenzeTemporali_Controller.FB_GetFrequenzeTemporaliDisponibili)
Note:
DualListAdvanced is the class name of web control
dlaFrequenzeTemporali is an object of DualListAdvanced class
objFrequenzeTemporali_Controller is the name of an object that
contains the function I have to pass to delegate, it is an object used
by DotNetNuke for database accessing
The problem is that when I invoke the function
F_SQLDisponibileToAttivo.Invoke(1), it rises an exception
(NullReferenceException). When I debug, F_SQLDisponibileToAttivo is
Nothing.
Can you give me a suggestion?
Thank you
Exch
for first time. I have a web control used in a form. Id like to pass
to this control a function pointer.
In the web control, I have defined a delegate and I have created a
variable of this type:
Public Delegate Sub SQLDisponibileToAttivo(ByVal
lintCodTipologiaInformazione As Integer)
Public F_SQLDisponibileToAttivo As SQLDisponibileToAttivo
Some lines after, in a sub, I invoke the delegate:
F_SQLDisponibileToAttivo.Invoke(1)
In the form in which is defined the web control, I try to pass the
function to the delegate:
Dim objFrequenzeTemporali_Controller As New
FrequenzeTemporali_Controller
dlaFrequenzeTemporali.F_SQLDisponibileToAttivo = New
DualListAdvanced.SQLDisponibileToAttivo(AddressOf
objFrequenzeTemporali_Controller.FB_GetFrequenzeTemporaliDisponibili)
Note:
DualListAdvanced is the class name of web control
dlaFrequenzeTemporali is an object of DualListAdvanced class
objFrequenzeTemporali_Controller is the name of an object that
contains the function I have to pass to delegate, it is an object used
by DotNetNuke for database accessing
The problem is that when I invoke the function
F_SQLDisponibileToAttivo.Invoke(1), it rises an exception
(NullReferenceException). When I debug, F_SQLDisponibileToAttivo is
Nothing.
Can you give me a suggestion?
Thank you
Exch