Tobias Krais wrote:
Hi together,

I created my first component and have now a big problem:
-----%<-----
private XComponent openDocument = null;
[...]
// Querying for the interface XPrintable on the loaded document
XPrintable xPrintable = (XPrintable)
        UnoRuntime.queryInterface(XPrintable.class, openDocument);
-----%<-----

I want to print the current document, but I don't know how to tell the
component the XComponent the user used when clicking on the item of the
menu.

Can anybody tell me how to do this?

Or generally: how to give variables to components?

If you implemented a ProtocolHandler (e.g. as part of an AddOn), which is used within a menu/toolbar click, you will be queried for an option al interface "XInitialization". If this optional interface is supported it's called and the frame (where the menu/toolbar exists) is provided there as first parameter.
Such frame can be used then to get access to the controller/model.


Greetings, Tobias

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


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

Reply via email to