Topics

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

 

Luke Davis
 

There is already one add-on for Audacity in progress. You might want to look at it to make sure you don't duplicate work, or to see if you can contribute features to each other.

https://github.com/Robert-J-H/AudacityTwoTwoPlus

On Fri, 31 Jul 2020, Adil Shaikh wrote:

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
 
--
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.

Adil Shaikh
 

Hi,

I’ve already checked out that project before. I don’t think that it’s being maintained any more. The last commit was in March 2018 and it was compatible with audacity 2.2.0.

If the add-on developer resumes his work and ports the code base to python3, then I would be happy to contribute.

Unfortunately, I’m still new to add-on development so, I can’t port his work. besides it has to be made compatible with latest audacity version.

the reason to start this add-on development was to just get my hands dirty in NVDA add-on development and I just wanted to get the feel. I'm still reading other's source code and learning something new.

 

 

Robert Hänggi
 

The code should actually already be Python3 compatible, at least on my
local branch.
Robert

On 01/08/2020, Adil Shaikh <ah.shaikh97@...> wrote:
Hi,

I’ve already checked out that project before. I don’t think that it’s being
maintained any more. The last commit was in March 2018 and it was compatible
with audacity 2.2.0.

If the add-on developer resumes his work and ports the code base to python3,
then I would be happy to contribute.

Unfortunately, I’m still new to add-on development so, I can’t port his
work. besides it has to be made compatible with latest audacity version.

the reason to start this add-on development was to just get my hands dirty
in NVDA add-on development and I just wanted to get the feel. I'm still
reading other's source code and learning something new.





Robert Hänggi
 

Luke, you were willing to collaborate, wasn't that so?
I'm actually still on NVDA 19.2.1. The new one doesn't behave the way I like it.
Robert

On 01/08/2020, Robert Hänggi <aarjay.robert@...> wrote:
The code should actually already be Python3 compatible, at least on my
local branch.
Robert

On 01/08/2020, Adil Shaikh <ah.shaikh97@...> wrote:
Hi,

I’ve already checked out that project before. I don’t think that it’s
being
maintained any more. The last commit was in March 2018 and it was
compatible
with audacity 2.2.0.

If the add-on developer resumes his work and ports the code base to
python3,
then I would be happy to contribute.

Unfortunately, I’m still new to add-on development so, I can’t port his
work. besides it has to be made compatible with latest audacity version.

the reason to start this add-on development was to just get my hands
dirty
in NVDA add-on development and I just wanted to get the feel. I'm still
reading other's source code and learning something new.





Luke Davis
 

I was, and I am, as I use Audacity frequently.
However my time is not my own right now, as my company is doing several big linux server migrations, which means I'm spending most days up to my neck in shell scripts and cloud systems.

Luke

On Sat, 1 Aug 2020, Robert Hänggi wrote:

Luke, you were willing to collaborate, wasn't that so?
I'm actually still on NVDA 19.2.1. The new one doesn't behave the way I like it.
Robert

bering.p
 

Hi,
There is another add-on for Audacity
https://github.com/paulber007/AllMyNVDAAddons/raw/master/audacityAccessEnhancement/audacityAccessEnhancement-2.0.nvda-addon
Best regards.
Paul.
Le 01/08/2020 00:57, Luke Davis a écrit :

There is already one add-on for Audacity in progress.  You might want to look at 
it to make sure you don't duplicate work, or to see if you can contribute 
features to each other.

https://github.com/Robert-J-H/AudacityTwoTwoPlus

  On Fri, 31 Jul 2020, Adil Shaikh wrote:

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

 





    

Adil Shaikh
 

Hi Robert,

,

Could you push your local changes to remote repo?

Please create GitHub task for what has to be done. I can’t promise anything as I’m not certain. But I’m willing to contribute if possible.

 

 

Luke Davis
 

No offense meant, but this is confusingly organized.
Aside from all the other add-on packages stored there,
You linked to audacityAccessEnhancement-2.0.nvda-addon
but in your audacity folder, you additionally have: audacity-3.1.nvda-addon

You also have a separate repo called AudacityNVDAAddon. Where does that fit in?

Which one is the most current code: audacity, audacityAccessEnhancement, or AudacityNVDAAddon?

Luke

On Sat, 1 Aug 2020, bering.p wrote:

Hi,
There is another add-on for Audacity
https://github.com/paulber007/AllMyNVDAAddons/raw/master/audacityAccessEnhancement/audacityAccessEnhancement-2.0.nvda-addon
Best regards.Paul.

bering.p
 

Hi,
The link I gave is the newest version of the add-on compatible with NVDA 2020.2, Audacity 2.4.2, 2.4.1, 2.3.3 and 2.3.2.
If what you were looking for s the repository of this add-on, here it is.
       
https://github.com/paulber19/audacityAccessEnhancementNVDAAddon
To answer your question, this add-on has a story and has been around for a long time (the list's archives can prove it) and has changed its name during its history so as not to be confused with other add-ons for Audacity, like Robert's.
It is now called "audacityAccessEnhancement" and all the releases of this add-on are in the "autacityAccessEnhancement" folder.
The old name was "audacity" and all of its releases are in the "Audacity" folder as well as the first versions with its new name that were not removed from the repo to be downloadable during the transition .
It is true that today, they are no longer useful in this repo, but it traces history.
Hoping to have been clear.


Sorry for my bad english.

Best regards.
Paul.



Le 01/08/2020 17:49, Luke Davis a écrit :

No offense meant, but this is confusingly organized.
Aside from all the other add-on packages stored there,
You linked to audacityAccessEnhancement-2.0.nvda-addon
but in your audacity folder, you additionally have: audacity-3.1.nvda-addon

You also have a separate repo called AudacityNVDAAddon.  Where does that fit in?

Which one is the most current code: audacity, audacityAccessEnhancement, or 
AudacityNVDAAddon?

Luke

  On Sat, 1 Aug 2020, bering.p wrote:

Hi,
There is another add-on for Audacity
https://github.com/paulber007/AllMyNVDAAddons/raw/master/audacityAccessEnhancement/audacityAccessEnhancement-2.0.nvda-addon
Best regards.Paul.




Adil Shaikh
 

Thanks Paul,

I’ll just drop my add-on and use yours add-on.

I don’t know why, but this add-on doesn’t come up in google search result. Otherwise I wouldn’t have started developing my add-on itself in first place.

 

I’m going to read your add-on source code. But could anyone explain how do you handle the situation when object doesn’t emit the expected event?

 

Could someone answer the original question?

What are the possible approaches?

 

bering.p
 

Hi,
How did you define the "Playmeter" class for your object in "ChooseOverlayClass" method ?
Best regards.
Paul.
Le 02/08/2020 13:59, Adil Shaikh a écrit :

Thanks Paul,

I’ll just drop my add-on and use yours add-on.

I don’t know why, but this add-on doesn’t come up in google search result. Otherwise I wouldn’t have started developing my add-on itself in first place.

 

I’m going to read your add-on source code. But could anyone explain how do you handle the situation when object doesn’t emit the expected event?

 

Could someone answer the original question?

What are the possible approaches?