RaiseEvent bug?
- From: "will f" <null@xxxxxxxxxx>
- Date: Tue, 7 Feb 2006 11:29:57 -0500
Greetings.
Does anyone ever have problems with events being raised in code, but the
event procedure not firing?
I have two classes in a single DLL project.
- Class1 contains the following event:
Public Event DataChanged(ByVal strField As String, ByVal vntValue As
Variant)
- Class2 contains a class-module-level variable declared as an instance
of Class1:
Private WithEvents m_objC1 As Class1
- Class2 also contains an event procedure to catch the DataChanged event
from Class1:
Private Sub m_objPol_DataChanged(ByVal strField As String, ByVal vntValue As
Variant)
On Error Resume Next
Dim intIdx As Integer
If InStr(1, strField, "PropState") Then
'// The changed data is the property state, so change the form
For intIdx = g_colLoadedForms.Count To 1 Step -1
Call SwitchStateForm(g_colLoadedForms(intIdx),
g_colLoadedForms(intIdx).Tag)
Next intIdx
Else
'// Otherwise, simply refresh form data on all the loaded pol forms
For intIdx = g_colLoadedForms.Count To 1 Step -1
Call g_colLoadedForms(intIdx).LoadFormData
Next intIdx
End If
End Sub
- A procedure in Class1 raises the event:
RaiseEvent DataChanged(strField, vntValue)
I placed a breakpoint at the RaiseEvent call and at the event procedure.
Stepping through the code, the RaiseEvent call is highlighted and seems to
execute without error.
However, the event procedure never executes.
Is this a feature of Windows XP? A bug in the VB IDE? Please help me.
Thanks in advance.
- will f.
.
- Follow-Ups:
- Re: RaiseEvent bug?
- From: Tony Proctor
- Re: RaiseEvent bug?
- From: Ken Halter
- Re: RaiseEvent bug?
- Prev by Date: Out Of memory
- Next by Date: Re: RaiseEvent bug?
- Previous by thread: Out Of memory
- Next by thread: Re: RaiseEvent bug?
- Index(es):