Hi
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 because there's no possibility to decide that the view was created (with your 'loadComponentFromURL( ..., "_blank", ... )') by the same script which is now trying to close the document - it could also be a view created by the user via File|Open.
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 ?
So, if you want to close the view (I suppose this is what you really want: get rid of the window displaying the document), then obtain the CurrentController of the model, and close the frame this controller lives in.
ok, thanks
If this was the last frame, the document should be closed automatically (if not, it's a bug). If there are more frames, you can iterate through them (CurrentController will point to the controller in the next frame, after you closed the previous one). However, this is rather unlikely for database documents, which to not have the "multiple views per document" (Window|New window) feature, at least not in the usual sense.
i'll test that and let you know laurent -- Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org Indesko >> http://www.indesko.com Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org Livre "Programmation OpenOffice.org", Eyrolles 2004 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
