H
herbert
I have a console project that manages an object tree:
dim withevents myObj as myClass
1) Using the binary serializer I can serialize and deserialize the object
tree without any error message - I was expecting .NET 3.x to give at least a
warning about event consumers.
I have to use binary serializer because of circular references inside the
object hierarchy.
2) after deserialization, inside the object trees all events are correctly
propagated up to the highest object, yet not to the event handler in the
console app. Which is correct.
3) after deserialization I use AddHandler myObj ... which does not result in
any event delivered.
questions:
Q1: What is missing to make AddHandler work?
Q2: Is the recipe by Mr. Rocky Lhotka about using custom events from 2004
http://www.lhotka.net/WeBlog/CommentView.aspx?guid=776f44e8-aaec-4845-b649-e0d840e6de2c
still best practice?
thank you very much. herbert
dim withevents myObj as myClass
1) Using the binary serializer I can serialize and deserialize the object
tree without any error message - I was expecting .NET 3.x to give at least a
warning about event consumers.
I have to use binary serializer because of circular references inside the
object hierarchy.
2) after deserialization, inside the object trees all events are correctly
propagated up to the highest object, yet not to the event handler in the
console app. Which is correct.
3) after deserialization I use AddHandler myObj ... which does not result in
any event delivered.
questions:
Q1: What is missing to make AddHandler work?
Q2: Is the recipe by Mr. Rocky Lhotka about using custom events from 2004
http://www.lhotka.net/WeBlog/CommentView.aspx?guid=776f44e8-aaec-4845-b649-e0d840e6de2c
still best practice?
thank you very much. herbert