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 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 this case, you'd
have a model, but no view at all.

Now if the user does a File|Open with the very same file you specified
in the URL, the the document is not loaded, again ('cause it already
*is*), but only a new view is created. Also, if you (or another script)
does a loadComponentFromURL with the URL in question, the document is
reused, and only a new view for it is created.

So, while the document knows that there exists a view for it, it cannot
know who's the owner of this view.

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