Frank Schönheit - Sun Microsystems Germany wrote:
That's why it's hard to tell who has the ownership of the document. If
it were the frame (opened by the user), and the frame would close it,
then the script would break. If it were the script, and the script would
close the doc, then the frame
Hi Mathias,
I think that this is an API misuse. A view never should veto closing the
document and in fact all other documents in OOo will not behave this
way. It doesn't matter how the view was created.
After reading the DevGuide chapter about closing documents (to which
Bernard pointed me),
Hi Bernard,
...
dbDoc.close(True)
The document usine.odb shows up, but the close instruction receives an
exception.
what kind of exception?
Ciao
Frank
--
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems
Hi Frank
I reproduced the problem
...
dbDoc.close(True)
The document usine.odb shows up, but the close instruction receives an
exception.
what kind of exception?
com.sun.star.util.CloseVetoException
Laurent
--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko
Hi Laurent,
com.sun.star.util.CloseVetoException
That's okay :), and it was a bug that this exception wasn't thrown
before. (Hmm. Thinking about it, do the other document types behave the
same way?)
The idea is that as long as a view to the document exists, you cannot
close the document - the
Hi Laurent,
dbdoc.currentController.Frame.close(false)
any reason you used false here? This means that if the close fails,
you're still responsible for it ...
Ciao
Frank
--
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems
Hi Laurent,
hum, the method of the object that created it is called
so there is a way to know that we want to close the views dependanding of it
are you saying taht views are not attached to their creators ?
They're bound to the model, but that's not necessarily the same as
creator.
For
Hi Frank
They're bound to the model, but that's not necessarily the same as
creator.
yes
For instance, you could load a model without any view, by retrieving the
DataSource at the DatabaseContext (getByName( URL ) ), and asking this
DataSource for its Document (.getDatabaseDocument). In
Bonjour Frank
Message du 2006-03-14 09:59:
Hi Laurent,
com.sun.star.util.CloseVetoException
That's okay :), and it was a bug that this exception wasn't thrown
before. (Hmm. Thinking about it, do the other document types behave the
same way?)
No. If I load a text document for example, no
Hi Laurent,
Would it be possible to identify controllers that are loaded by
different ways ?
Hmm, not that I know. Basically, a controller is (almost) always loaded
by a loadComponentFromURL, but nobody knows who called this method.
Ciao
Frank
--
- Frank Schönheit, Software Engineer
Hi Bernard,
No. If I load a text document for example, no problem to close it.
...
The idea is that as long as a view to the document exists, you cannot
close the document - the view will veto is.
This is not the case for documents other than odb.
Hmm. Do you mind submitting an issue for
Hi Laurent,
in fact, what about the datasource that seems to load the file without
displaying it as frank said
We then end with 2 loads of the document
one for the datasource ( maSource.DatabaseDocument)
one for the loadComponentFromURL
Effectively, it's loaded once only, but you have
Bonjour Frank
Message du 2006-03-14 12:37:
Hi Laurent,
in fact, what about the datasource that seems to load the file without
displaying it as frank said
We then end with 2 loads of the document
one for the datasource ( maSource.DatabaseDocument)
one for the loadComponentFromURL
Hi Bernard,
In the original code, I can understand that, although it is not obvious.
But if I directly load the odb file, I still get the same exception
the datasource is loaded to be accessed
so you end with the same previous case i guess
this is the difference with other document types :
Hi bernard
Bernard Marcelly a écrit :
Bonjour Frank
Message du 2006-03-14 12:33:
Hmm. Do you mind submitting an issue for this (and assigning it to me)?
Not sure how it could be solved, since database documents are a little
bit different (as you can obtain them without loading, via the
Hi Bernard,
Issue filed : http://www.openoffice.org/issues/show_bug.cgi?id=63162
Thanks.
Ciao
Frank
--
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems http://www.sun.com/staroffice -
- OpenOffice.org Database
Hi developers,
I would like to have your opinion on a code which was working with 1.9
and does not work in 2.0.1 and 2.0.2. Operating System is Win XP SP2 Home.
I can open a Base document, but it is impossible to close it by API :
com.sun.star.util.CloseVotoException
Dim monDbContext As
17 matches
Mail list logo