Hi folks,

I'm working on an application basically made up of a number of OOo
macros (in Python) and I've run into problems working with dialogs. What
I'm trying to do is have a non-modal dialog that will be permanently
displayed to the user to show application-related information that is
updated as macros are executed on text within a Writer document.

Now the problem. I want subsequent macro calls to access the same dialog
(which is open all the time) and I can't find a way to get access the
open dialog control from a freshly-called macro. Basically, I create the
dialog once using a macro containing something like:

ctx = uno.getComponentContext()
smgr = ctx.ServiceManager
dialogModel = smgr.createInstanceWithContext(
    "com.sun.star.awt.UnoControlDialogModel", ctx)
## snip
toolkit = smgr.createInstanceWithContext(
    "com.sun.star.awt.Toolkit", ctx)
controlContainer.createPeer(toolkit, None)
controlContainer.setVisible(True)

and once this macro has finished, I want to access the same
UnoControlDialogModel from subsequent macros. I've tried through Desktop
frames and components, but the dialog doesn't seem to have a parent that
I can access.

It seems to me that either I'm missing something fundamental about
window/frame hierarchies or OOo dialogs simply don't work the way I'm
trying to use them (and I should look into forms to do what I need). How
can I access an open dialog window from a macro? Any help would be
greatly appreciated.

Cheers,

Zbigniew Banach

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

Reply via email to