object name changed, but event_nameChange event is not fired

Adil Shaikh
 

Hi all,

I’ve been trying to write add-on for audacity.

The basic features are already implemented and works well. But I have trouble implementing play meter feature to know the current level of meter.

Here is what I’m trying to achieve

  • The play meter displays the value in obj.name
  •  So, when the obj.name is changed, NVDA should announce new name.

 

Code snippets that I’ve already tried.

class Playmeter (IAccessible):

                def event_nameChange (self):

                                ui.message (self.name)

 

 

here is dev info for the object:

Developer info for navigator object:

name: 'Play Meter  Peak -5 dB'

role: ROLE_DROPDOWNBUTTON

roleText: None

states: STATE_FOCUSABLE

isFocusable: True

hasFocus: False

Python object: <appModules.audacity.PlayMeter object at 0x05592F90>

Python class mro: (<class 'appModules.audacity.PlayMeter'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'object'>)

description: None

location: RectLTWH(left=896, top=44, width=25, height=25)

value: None

appModule: <'audacity' (appName 'audacity', process ID 7004) at address e9cf10>

appModule.productName: 'Audacity'

appModule.productVersion: '2,4,2,0'

TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>

windowHandle: 3933800

windowClassName: 'wxWindowNR'

windowControlID: -31982

windowStyle: 1375731712

extendedWindowStyle: 65536

windowThreadID: 10644

windowText: 'Meter-Play'

displayText: ''

IAccessibleObject: <POINTER(IAccessible) ptr=0x6d4edc8 at 7a080d0>

IAccessibleChildID: 0

IAccessible event parameters: windowHandle=3933800, objectID=-4, childID=0

IAccessible accName: 'Play Meter  Peak -5 dB'

IAccessible accRole: ROLE_SYSTEM_BUTTONDROPDOWN

IAccessible accState: STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048576)

IAccessible accDescription: exception: (-2147352573, 'Member not found.', (None, None, None, 0, None))

IAccessible accValue: exception: (-2147352573, 'Member not found.', (None, None, None, 0, None))

 

 

 

If someone wants complete source code, here is the link:

https://github.com/adil-s/audacity-NVDA-add-on

 

nvda version: 2020.2.0

audacity version: 2.4.2

 

please could someone help?

 

 

Sent from Mail for Windows 10

 

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