Andreas Schlüns wrote: >> Can XComponentLoader generate an event when all the document is load? > > There is already such event. But it's not generated by the component > loader itself. It's generated by the document, which was loaded and will > be broadcasted by another singleton instance named > com.sun.star.frame.GlobalEventBroadcaster (which implements the > interface css.document.XEventBroadcaster. > > The callback css.document.XEventListener.notifyEvent() contains a > reference to the model. For loading (or creating empty) documents exists > different events. > > OnNew => for creating a new empty (visible) doc > OnLoad => for loading an existing doc (visible) from disc > > OnCreate => for creating an empty (hidden) doc > OnLoadFinished => for loading an existing doc (hidden) from disc
Not completely correct. *Every* document (visible and invisible ones) sends either OnCreate or OnLoadFinished. But as Andreas mentioned loading is complete when loadComponentFromURL returns, so the events appear while the call is still ongoing. Only visible documents also send OnNew or OnLoad, and this will happen after loadComponentFromURL. Best regards, Mathias -- 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]