Jacob Kruger, il 13/01/2021 10.19, ha scritto:
how would I retrieve an instance of an NVDA object based on this controlID?Alberto:
it may vary, according to specific API (IAccessible, UIA, Java, etc).
A way widely adopted is using NVDAObjects.IAccessible.getNVDAObjectFromEvent( (for IAccessible case). Other useful methods for getting this result can be windowUtils.findDescendantWindow, watchdog.cancellableSendMessage, etc.
def event_gainFocus(self, obj, nextHandler):Alberto:
I'm not sure about your 4th question. Anyway, the code is correct, but remember to close calling nextHandler(); in some cases, however, you could want to do something before the object creation, that is, before the event: then you have to write something like:
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
if obj.property match condition:
#do something, assign gestures, etc