Hi Andreas !
I'm fighting with those damn listeners right now, this is really hard.
I have some remarks on this.
1. When I close a document inside the Tab, the tab is not removed.
That could be fixed by keeping the FrameActionListener on the
child frame and listening on COMPONENT_DETACHING events.
This way whenever user closes a document opened inside a tab
the tab itself closes too. I think that would also work with the File->
mechanism.
2. Whenever a Component is disposed it calls the disposing() method
of listeners attached to it. Those listeners should then clear all the
references to this component, but there's no need to call removeEventListener()
because that will be done inside the component itself. So, I added an
event listener to the frame component, to check if it's being disposed.
3. When the TopWindow's close button is hit the TopWindow listener - me - is notified
with disposing(), so I go through the list of frames and issue the dispatch command
.uno:FrameClose. But ! I don't get the notifyClosing from any frame, nor is the disposing
method of the EventListener listinening on the frames called ! So I think there's
something wrong with my dispatch. It looks like this :
Reference< ::css::frame::XDispatchHelper > xDispatch(
m_xServiceManager->createInstance(
::rtl::OUString::createFromAscii(
"com.sun.star.frame.DispatchHelper")),
UNO_QUERY_THROW);
Reference< XDispatchProvider > xDP((*childListIter).m_cFrame, UNO_QUERY_THROW);
xDispatch->executeDispatch(xDP,
::rtl::OUString::createFromAscii(".uno:CloseFrame"),
::rtl::OUString::createFromAscii(""), 0,
Sequence< ::css::beans::PropertyValue >()
);
4. When the File->Exit is hit the notifyClosing() is called properly, I have some other
problems here, but I'm still woking on it.
5. I have some problems with m_refCount, after cleaning everything up it's still up to 3,
and that's even if I force the child frames to dispose :-/
I can't find the reason for this yet.
Regards,
Andrzej
- Re: [framework-dev] Google Summer of Code 20... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Code 2005 - ... Andreas Schlüns
- Re: [framework-dev] Google Summer of Code 2005 - ... Andreas Schlüns
- Re: [framework-dev] Google Summer of Code 20... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Code 20... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Code 2005 - ... Andreas Schlüns
- Re: [framework-dev] Google Summer of Code 20... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Cod... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summe... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summe... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Code 2005 - ... Andreas Schlüns
- Re: [framework-dev] Google Summer of Code 20... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Cod... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Code 2005 - ... Andreas Schlüns
- Re: [framework-dev] Google Summer of Code 20... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Code 2005 - ... Andreas Schlüns
- Re: [framework-dev] Google Summer of Code 20... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Cod... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of... Andrzej Wytyczak-Partyka
- Re: [framework-dev] Google Summer of Code 2005 - ... Andreas Schlüns