Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|
Focus = api.getFocusObject() Focus.parent.setFocus()
Should do the trick. See code found in the developer toolkit addon for plenty of examples of how it works.
toggle quoted messageShow quoted text
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 7:51 AM To: nvda-addons@nvda-addons.groups.io Subject: [nvda-addons] Set and report focus of parent element instead of actually focused one
Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|
i am using event_NVDAObject_init to get current object, then checking if it is the object that i need and then obj.parent.setFocus() and even obj.parent.reportFocus(). reportFocus reports name of parent element however setFocus doesn't work and after reportFocus it reads originaly focused element. maybe there is another way of reading parent element of focused object. i may even don't need to place focus, i only need to read parent element and don't read current object.
thank you.
2020-10-30 19:17 GMT+04:00, Andy B. <sonfire11@gmail.com>:
toggle quoted messageShow quoted text
Focus = api.getFocusObject() Focus.parent.setFocus()
Should do the trick. See code found in the developer toolkit addon for plenty of examples of how it works.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 7:51 AM To: nvda-addons@nvda-addons.groups.io Subject: [nvda-addons] Set and report focus of parent element instead of actually focused one
Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|
What about overriding the object.name with the parent's name? Obj.name = obj.parent.name
I think this is one of the first examples of event_NVDAObject_init in the add-on developer guide? Travis
toggle quoted messageShow quoted text
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 10:41 AM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one i am using event_NVDAObject_init to get current object, then checking if it is the object that i need and then obj.parent.setFocus() and even obj.parent.reportFocus(). reportFocus reports name of parent element however setFocus doesn't work and after reportFocus it reads originaly focused element. maybe there is another way of reading parent element of focused object. i may even don't need to place focus, i only need to read parent element and don't read current object. thank you. 2020-10-30 19:17 GMT+04:00, Andy B. <sonfire11@gmail.com>: Focus = api.getFocusObject() Focus.parent.setFocus()
Should do the trick. See code found in the developer toolkit addon for plenty of examples of how it works.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 7:51 AM To: nvda-addons@nvda-addons.groups.io Subject: [nvda-addons] Set and report focus of parent element instead of actually focused one
Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|
then position info is still not announced.
2020-10-30 19:47 GMT+04:00, Travis Roth <travis@travisroth.net>:
toggle quoted messageShow quoted text
What about overriding the object.name with the parent's name? Obj.name = obj.parent.name
I think this is one of the first examples of event_NVDAObject_init in the add-on developer guide? Travis
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 10:41 AM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
i am using event_NVDAObject_init to get current object, then checking if it is the object that i need and then obj.parent.setFocus() and even obj.parent.reportFocus(). reportFocus reports name of parent element however setFocus doesn't work and after reportFocus it reads originaly focused element. maybe there is another way of reading parent element of focused object. i may even don't need to place focus, i only need to read parent element and don't read current object.
thank you.
2020-10-30 19:17 GMT+04:00, Andy B. <sonfire11@gmail.com>:
Focus = api.getFocusObject() Focus.parent.setFocus()
Should do the trick. See code found in the developer toolkit addon for plenty of examples of how it works.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 7:51 AM To: nvda-addons@nvda-addons.groups.io Subject: [nvda-addons] Set and report focus of parent element instead of actually focused one
Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|
I wouldn't overwrite focus with the parent object. It could become confusing when quickly browsing code. If you are trying to get the position of the list item, look for a property/method on the parent called positionInfo.
toggle quoted messageShow quoted text
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 1:42 PM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one then position info is still not announced. 2020-10-30 19:47 GMT+04:00, Travis Roth <travis@travisroth.net>: What about overriding the object.name with the parent's name? Obj.name = obj.parent.name
I think this is one of the first examples of event_NVDAObject_init in the add-on developer guide? Travis
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 10:41 AM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
i am using event_NVDAObject_init to get current object, then checking if it is the object that i need and then obj.parent.setFocus() and even obj.parent.reportFocus(). reportFocus reports name of parent element however setFocus doesn't work and after reportFocus it reads originaly focused element. maybe there is another way of reading parent element of focused object. i may even don't need to place focus, i only need to read parent element and don't read current object.
thank you.
2020-10-30 19:17 GMT+04:00, Andy B. <sonfire11@gmail.com>:
Focus = api.getFocusObject() Focus.parent.setFocus()
Should do the trick. See code found in the developer toolkit addon for plenty of examples of how it works.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 7:51 AM To: nvda-addons@nvda-addons.groups.io Subject: [nvda-addons] Set and report focus of parent element instead of actually focused one
Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|
ok, than how i can report it with obj.name of currently focused element?
2020-10-30 21:50 GMT+04:00, Andy B. <sonfire11@gmail.com>:
toggle quoted messageShow quoted text
I wouldn't overwrite focus with the parent object. It could become confusing when quickly browsing code. If you are trying to get the position of the list item, look for a property/method on the parent called positionInfo.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 1:42 PM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
then position info is still not announced.
2020-10-30 19:47 GMT+04:00, Travis Roth <travis@travisroth.net>:
What about overriding the object.name with the parent's name? Obj.name = obj.parent.name
I think this is one of the first examples of event_NVDAObject_init in the add-on developer guide? Travis
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 10:41 AM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
i am using event_NVDAObject_init to get current object, then checking if it is the object that i need and then obj.parent.setFocus() and even obj.parent.reportFocus(). reportFocus reports name of parent element however setFocus doesn't work and after reportFocus it reads originaly focused element. maybe there is another way of reading parent element of focused object. i may even don't need to place focus, i only need to read parent element and don't read current object.
thank you.
2020-10-30 19:17 GMT+04:00, Andy B. <sonfire11@gmail.com>:
Focus = api.getFocusObject() Focus.parent.setFocus()
Should do the trick. See code found in the developer toolkit addon for plenty of examples of how it works.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 7:51 AM To: nvda-addons@nvda-addons.groups.io Subject: [nvda-addons] Set and report focus of parent element instead of actually focused one
Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|
You would use api.getFocusObject().parent.positionInfo() most likely.
toggle quoted messageShow quoted text
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 2:27 PM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one ok, than how i can report it with obj.name of currently focused element? 2020-10-30 21:50 GMT+04:00, Andy B. <sonfire11@gmail.com>: I wouldn't overwrite focus with the parent object. It could become confusing when quickly browsing code. If you are trying to get the position of the list item, look for a property/method on the parent called positionInfo.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 1:42 PM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
then position info is still not announced.
2020-10-30 19:47 GMT+04:00, Travis Roth <travis@travisroth.net>:
What about overriding the object.name with the parent's name? Obj.name = obj.parent.name
I think this is one of the first examples of event_NVDAObject_init in the add-on developer guide? Travis
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 10:41 AM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
i am using event_NVDAObject_init to get current object, then checking if it is the object that i need and then obj.parent.setFocus() and even obj.parent.reportFocus(). reportFocus reports name of parent element however setFocus doesn't work and after reportFocus it reads originaly focused element. maybe there is another way of reading parent element of focused object. i may even don't need to place focus, i only need to read parent element and don't read current object.
thank you.
2020-10-30 19:17 GMT+04:00, Andy B. <sonfire11@gmail.com>:
Focus = api.getFocusObject() Focus.parent.setFocus()
Should do the trick. See code found in the developer toolkit addon for plenty of examples of how it works.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 7:51 AM To: nvda-addons@nvda-addons.groups.io Subject: [nvda-addons] Set and report focus of parent element instead of actually focused one
Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|
i understand it, but how i can make it possible to read obj.name and positionInfo when navigating? i've got positionInfo and it has two items in dictionary
2020-10-30 22:55 GMT+04:00, Andy B. <sonfire11@gmail.com>:
toggle quoted messageShow quoted text
You would use api.getFocusObject().parent.positionInfo() most likely.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 2:27 PM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
ok, than how i can report it with obj.name of currently focused element?
2020-10-30 21:50 GMT+04:00, Andy B. <sonfire11@gmail.com>:
I wouldn't overwrite focus with the parent object. It could become confusing when quickly browsing code. If you are trying to get the position of the list item, look for a property/method on the parent called positionInfo.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 1:42 PM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
then position info is still not announced.
2020-10-30 19:47 GMT+04:00, Travis Roth <travis@travisroth.net>:
What about overriding the object.name with the parent's name? Obj.name = obj.parent.name
I think this is one of the first examples of event_NVDAObject_init in the add-on developer guide? Travis
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 10:41 AM To: nvda-addons@nvda-addons.groups.io Subject: Re: [nvda-addons] Set and report focus of parent element instead of actually focused one
i am using event_NVDAObject_init to get current object, then checking if it is the object that i need and then obj.parent.setFocus() and even obj.parent.reportFocus(). reportFocus reports name of parent element however setFocus doesn't work and after reportFocus it reads originaly focused element. maybe there is another way of reading parent element of focused object. i may even don't need to place focus, i only need to read parent element and don't read current object.
thank you.
2020-10-30 19:17 GMT+04:00, Andy B. <sonfire11@gmail.com>:
Focus = api.getFocusObject() Focus.parent.setFocus()
Should do the trick. See code found in the developer toolkit addon for plenty of examples of how it works.
-----Original Message----- From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Aleksey Varfolomeev Sent: Friday, October 30, 2020 7:51 AM To: nvda-addons@nvda-addons.groups.io Subject: [nvda-addons] Set and report focus of parent element instead of actually focused one
Good day everyone.
could you help me please to make a thing, where i could set and report focus of a parent element instead of actually focused one? the thing is that in one app, focus when navigating in listview lands in its child element which adds some extra things and position of listview item is not reported. i want to correct this on an appmodule level.
thank you.
|
|