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 two clients of it: the
script which (implicitly) loaded it via maSource.DatabaseDocument, and
the user (or script) which (explicitly) loaded it.

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 would silently be closed, too, even if the
user doesn't want this.

Thus, the idea was that any client obtaining a database document must
register as CloseVetoListener. Frames (resp. the Controller for a DBDoc)
do this automatically, speaking strictly, your script would need to do
this, too, to be on the safe side against closes by foreign parties.

However, this interpretation might be too strict (and the scenario too
esoteric). Should probably discuss this with the people who implemented
the closing mechanism for the other document types, they must have had
reasons to do it the way they did :)

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

Reply via email to