A
Atara
In my WindowForms Application I have Control1 inside Control2 inside
Control3 inside theMainForm.
I have a scenario that Control1 should call/sendEvent to theMainForm. in
response, theMainForm calls a function that among other things call
Control3 to delete Control2 (containing Control1) and add another
control instead.
(something like -
1. On the left, a treeView navigation control.
2. On the right, a complicated control that its view depends on the
treeView.selectedNode.
3. The MainForm get a call/an event from a control inside the right
panel to change the right panel content. (including the caller
control...)
I tried both Call directly theMainForm or bubbleUp an event, in most
cases this work, but sometimes it doesnot.
I guess the reason is that the function/event return to Control1 that
does not exist anymore.
What is the right way to call a function that eventually would dispose
the caller?
Thanks.
Atara.
Control3 inside theMainForm.
I have a scenario that Control1 should call/sendEvent to theMainForm. in
response, theMainForm calls a function that among other things call
Control3 to delete Control2 (containing Control1) and add another
control instead.
(something like -
1. On the left, a treeView navigation control.
2. On the right, a complicated control that its view depends on the
treeView.selectedNode.
3. The MainForm get a call/an event from a control inside the right
panel to change the right panel content. (including the caller
control...)
I tried both Call directly theMainForm or bubbleUp an event, in most
cases this work, but sometimes it doesnot.
I guess the reason is that the function/event return to Control1 that
does not exist anymore.
What is the right way to call a function that eventually would dispose
the caller?
Thanks.
Atara.