Oliver Brinzing wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Mathias,
> 
>> What means "without success"? What exactly did you do and what exactly 
>> happened?
> 
> that means, the preview is not closed, if i open a message box directly after 
> the
> excecuteDispatch(), it does not matter if i use the SynchronMode or not ...
> the message box is shown in preview mode, after closing it, preview mode is 
> still active ...
> without showMessageBox() the preview is closed ...

This shows that closing is not done synchronously and so it is prevented
by the dialog box that is opened before the view can be exchanged. Of
course you can't close a view that contains a modal dialog!

Obviously there is an additional asynchronity in the code that executes
the "ClosePreview" command, it's not the dispatcher that works
asynchronously. I had a look into the Writer code and indeed this is
what happens. The closing of the preview is done by creating a new view
and replacing the preview in the same window by it, and this is done
asynchronously. I assume this is done to protect against possible
crashes in case execution of the dispatch calls is requested by an
object inside the view that can't cope with being killed itself before
the call returns.

So at least currently you can't do anything against it, except writing
an issue of course asking the Writer developers for switching to a
synchronous exchange of the View (though I don't know if this is feasible).

Best regards,
Mathias Bauer

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