How to use eventHandler.requestEvents


falkogiepmans@...
 

Hi all,

Currently I am working on a appModule for SAP, this has its own API and internal events. I would like NVDA to be able to listen to some of those events. One of these events is "FocusChanged", since NVDA does not notice this in SAP. My idea was to use requestEvents as follows:

Example Code
class AppModule(appModuleHandler.AppModule):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        eventHandler.requestEvents("FocusChanged", processId=self.processID,windowClassName='someWindow')
End Example Code

And use this event in some overlayclass:

Example Code
class SAPClass(IAccessible):
    def event_FocusChanged(self):
        ...do something...
End Example Code

This does not seem to work. Is this what eventHandler.requestEvents is meant for or am I understanding it wrong? I am quite new to events in general but I want to get my head around it.
Side question: Is this the place to post these kind of questions?

Thanks in advance,
Falko
 
 

Join nvda@nvda.groups.io to automatically receive all group messages.