B
Bob Day
Using vs 2003, vb.net
It is not clear from the documentation, but it appears that a raised event
will traverse up the call stack upwards until it reaches its handler. Is
this correct? See the code snippet below. The event raised in sub1 or
class three will be caught in Class1 event handler (I know below is not
syntactically correct, but you get the idea).
Class 1 '------------------
friend Class2 as Class2x
Sub TestEvent_EventHandler Handles TestEvent
' raised event in class 3 caught here
end sub
' call something in class 2
end class
Class2 '------------------
friend Class3 as class 3x
Call Sub1 in class3
end class
Class 3 '------------------
Event TestEvent
Sub 1
RaiseEvent TestEvent
end sub
End class
please advise.
Bob Day
It is not clear from the documentation, but it appears that a raised event
will traverse up the call stack upwards until it reaches its handler. Is
this correct? See the code snippet below. The event raised in sub1 or
class three will be caught in Class1 event handler (I know below is not
syntactically correct, but you get the idea).
Class 1 '------------------
friend Class2 as Class2x
Sub TestEvent_EventHandler Handles TestEvent
' raised event in class 3 caught here
end sub
' call something in class 2
end class
Class2 '------------------
friend Class3 as class 3x
Call Sub1 in class3
end class
Class 3 '------------------
Event TestEvent
Sub 1
RaiseEvent TestEvent
end sub
End class
please advise.
Bob Day