Disposing of the parent when the children are disposed [message #455156] |
Sun, 08 May 2005 08:22 |
Eclipse User |
|
|
|
Originally posted by: jjdorney.hotmail.com
Backwards, I know, but I want to do it. Any suggestions?
I started off by creating a DisposeListener that maintained a reference
to the parent object and disposed it when widgetDisposed was called.
That got me an infinite loop as the parent disposed of the child, that
was disposing of the parent, that ... etc..
I stopped most of the infinite loop by changing the listener so that it
detected when it was being called a second time and did nothing on that
call.
That left me with a NullReference error ... which I'm not entirely sure
of. It had something to do with a deregister called on a Control.
I'm stumped. Does anyone have a solution to this? How do I dispose of
a parent when its child has been disposed?
Thanks
Jervina
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02670 seconds