Hi Cameron,,

I had a short look on the SlideShow code. It's quite strange, the class that allows to add and remove listeners is not the same as the class that sends the disposing events. IMHO this cant work as the event source in the disposing() call won't match the object that was used for registration.

I have cc'ed the Impress developers, maybe they can shed some light on this.

Regards,
Mathias


On 06/28/2010 05:49 PM, Cameron Flint wrote:
Hello Mathias,

Thanks for the response. I've double-checked that:

- registration of the slideshow listener is successful (I receive all other
events as expected),
- my listener derives only from the XSlideshowListener class, and
- at no other point in my code do I remove the listener.

Here are a few more details on the problem:

1. I do not receive a dispose() call both for the case that I have manually
called XPresentation.end() (before the slide show is complete), and the case
that the slideshow exits normally.
2. Same goes for in-window as well as full-screen presentations.
3. When I attempt to de-register the listener, the actual error preventing
me from doing so is that XPresentation2.getController() returns null. Of
course, this only occurs when the slideshow has already been disposed by the
third party.
4. I am developing on Symphony 3 beta 3, which I am fairly certain uses OO
310m11(Build:9399) (at least, that is the version in its
unoil.jar/MANIFEST.MF).

I should mention that this issue is not necessarily an impediment, as I've
long-since simply removed the de-register without any observable side
effects. It would be much more satisfying, however, to get to the root
issue. :)

-- Cameron


On Fri, Jun 25, 2010 at 3:29 AM, Mathias Bauer<nospamfor...@gmx.de>  wrote:

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





--
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