[nvda-addons] Re: How do I debug a global plugin?

  • From: "Joseph Lee" <joseph.lee22590@xxxxxxxxx>
  • To: <nvda-addons@xxxxxxxxxxxxx>
  • Date: Sun, 19 Jul 2015 09:43:00 -0700

Hi,
If I haven't updated my own guide, I'll do so (note that this also applies to
app module constructor as well).
Cheers,
Joseph

-----Original Message-----
From: nvda-addons-bounce@xxxxxxxxxxxxx
[mailto:nvda-addons-bounce@xxxxxxxxxxxxx] On Behalf Of James Scholes
Sent: Sunday, July 19, 2015 3:53 AM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: How do I debug a global plugin?

Pranav Lal wrote:

<snip 3. You're missing a super call in __init__. Forgetting this breaks your
keyboard in a really obvious way until you fix it; I've hit this more than
once.
So add:
super(GlobalPlugin, self).__init__() to the top of the method.
PL] Is this true for all global plugins? If yes, then we need to update the
developer guide. Shall I raise a ticket?

Yep. This is good practice in Python when subclassing anything.
globalPluginHandler.GlobalPlugin inherits from baseObject.ScriptableObject,
which has its own __init__ method which, as Tyler mentioned, can make or break
your keyboard functionality. Without a call to super(), this method won't be
ran.
--
James Scholes
http://twitter.com/JamesScholes
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting
bugs.

Community addons are available from: http://addons.nvda-project.org To send a
message to the list: nvda-addons@xxxxxxxxxxxxx To change your list
settings/unsubscribe: //www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

Other related posts: