Christoph Lutz wrote:

> Hi,
> 
> I would like to veto the close-action (clicking on the "x" in a writer
> document) in such a form, that the document doesn't get closed until
> my program decides when it's time to close the document. This should
> be possible by throwing a CloseVetoException in the queryClosing(...)
> handler when getsOwnership==true, but it does not to work with my
> example code (below). The CloseVetoException I throw does not seem to
> prevent OOo from actually closing the document.
> 
> Any Ideas what could be wrong with my example?

I think there is nothing wrong. You have registered as a CloseListener
at the document, the "model". I assume that this has worked and the
model is still there, so it's not surprising that no "notifyClosing" was
called.

But that doesn't mean that you have prevented the view(s) on this model
from becoming closed, so the window can be closed as usual. If you want
to prevent the views from being closed you must register as a close
listener at the corresponding frames.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to