Hello Robert,

Hallo,

is there a way how to consume event receieved from document's XEventListenrr?

I can listen for events, but I have no idea how to consume them. The
goal is simple  - when I have non-modal JFrame opened, I would like to
remove possibility to close document until my JFrame disappears.

Seams that XEventListener and OnPrepareUnload isnt right doing your job.
Such document events are thought to be used for jobs based on the document itself. E.g. changing it's content at runtime depending from external stuff ... or doing something in parallel.

Hindering a document on closing has to be done by using the interface XClosable provided by the model (use queryInterface() to retrieve it) and registere a XCloseListener. Such listener will be called also if the document should be closed and it can disagree with that by throwing a suitable CloseVetoException. Note: if such exception was thrown one times might be the source of this exception has to make sure the document will be closed later. Read the interface description carefully.


Best regards,
Robert



Regards
Andreas

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

Reply via email to