On 1/2/06, Andrew Jensen <[EMAIL PROTECTED]> wrote:
> Matthias,
>
> Thanks for the suggestion. However, I had read that section. The way I took 
> this
> was that it is equivilant to assigning a procedure to a given event using
> Tools>Configure>Events and selecting OpenOffice.org. Am I wrong on this?

GlobalEventBroadcaster supports 2 interfaces: XEventsSupplier and
XEventBroadcaster. I'm talking about the XEventBroadcaster interface
which is not the same as Tools->Configure->Events.

> Also the documentation states:
>
> "The event source in the notifications is NULL (empty)."

I don't know where this particular quote comes from but I know for a
fact that if you register an event handler via XEventBroadcaster you
will get a proper event source.

> This is my problem, what I don't understand is how
> once in my event handler is called what am I checking
> to see if it supprots the interfcae XOfficeDatabaseDocument?

In Java you use UnoRuntime.queryInterface().

> As I state in the first email if the event is a Base document opening then
>  thisComponent is null,

ThisComponent is only useful for macros stored in documents.

> StarDesktop.CurrentComponent
> and StarDesktip.CurrentController don't seem to help.

They refer to the foreground document which is not necessarily the
event source, so it is usually just as unhelpful as ThisComponent as
far as events are concerned.

To do things properly you have to use the XEventBroadcaster interface
to register a real event handler. I don't know how to do this from
StarBasic or if it it is even possible.

Matthias

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

Reply via email to