Hi Cameron,

On 06/23/2010 08:47 PM, Cameron Flint wrote:
Hello,

I have a class which implements XSlideshowListener, and attempts to override
the disposing() (from the XEventListener superclass) in order to set a flag
to ensure that I don't try to remove it a second time if the target
slideshow has already been disposed. However, I never seem to get this call.
Consequently, my cleanup routine which calls
XSlideShowController.removeSlideshowListener() receives a
NullPointerException since the slideshow has already terminated, unbeknown
to my listener.

It would seem that a listener registered on a slideshow should be notified
when that slideshow disposes, or am I mistaken?

No, you are right. When an object is disposed, it will notify all registered event listeners. So if an object obviously was disposed, but you didn't receive a notification, the reasons that I could imagine are

- your registration failed or was not carried out at all
- your class derives from another one that implements the disposing() method and you accidently used a wrong method declaration
- your listener was removed already before the slide show was disposed

Did you receive any slide show events? Have you made shure that the listener wasn't removed before the slide show was disposed?

Regards,
Mathias

--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "nospamfor...@gmx.de".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to