[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: DisposeListener vs dispose()

I tried the experiment (see files) and I saw the same behaviour. So this is indeed a SWT related question. I also noticed the following note in the dispose() method javadoc which I apparently overlooked before:

NOTE: This method is not called recursively on the descendents
of the receiver. This means that, widget implementers can not
detect when a widget is being disposed of by re-implementing
this method, but should instead listen for the <code>Dispose</code>
event.

So I don't know when the disposed method should be used but it seems that I should always use the dispose listener instead of the method to dispose my own stuff.
 

--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91955361.html

Attachment: DisposeTest.java
Description: Binary data

Attachment: CustomControl.java
Description: Binary data