Hi Daniel,

> Q1: Why can't I retieve the XFrame starting from the top (XDesktop)
>     while I can get it starting from the bottom (XModel)?

Hard to answer without knowing how exactly you tried to retrieve the
frame. I'd say that iterating over the frames at the desktop, and
checking for a frame whose model is the one returned by
loadComponentFromURL, should give you the frame. Is this what you do?

> I sucessfully create a second XModel through the service manager
> xServiceManager.createInstanceWithContext
>     ( "com.sun.star.text.TextDocument", xComponentContext )
> Call this xModel_B
> 
> Now what I would like to do is replace xModel_A with xModel_B.
> I tried calling the XController.attachModel( xModel_B ) which returns
> False meaning the new model was not attached.
> 
> Q2: How to I replace xModel_A with xModel_B in the
>     Frame-Controller-Model Structure?

attachModel should be the right thing to do, however, I would not bet
that all implementations properly support it.

However, you did not mention that you initialized the second model after
creating it. You should call one of the two XLoadable methods (initNew
or load) before doing anything else with the model.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         frank.schoenh...@sun.com -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to