LibreO Base Form Event Listener

I want to create an event listener for a LibreO Base form in LibreO Basic, I THINK I have the bones of how to do it but don’t know the specifics.

It seems to require 2 lines of code along the lines of:

objFormListener = CreateUnoListener(“FormListener_”,“”) ThisComponent.com_sun_star_somecomponent_XEventBroadcaster_addEventListener(objFormListener)

And then an event handler such as:

Sub Sub FormListener_notifyEvent(objEvent As Object) MsgBox objEvent.EventName & " fired" End Sub 'FormListener_notifyEvent

I have been unable to find what “somecomponent” should be! (I have tried “form” and “forms”) to no avail.

Can anyone help?

Cross posted to ooBase Form Event Listener (View topic) • Apache OpenOffice Community Forum

And to

From the post on, it looks like you want to investigate all available event handlers. Perhaps getScriptEvents would help, as described at How to programmatically get/set a form control's events.