← Back to team overview

nvda-sonar-users team mailing list archive

Re: Plugin Class Definition Code Question

 

Hi GAvin,

Note that the list doesn't force replies to itself by default and I can't override this. Nudging this back to the list.

On 27/12/2012 3:07 AM, Gavin Grundlingh wrote:
elif obj.role == controlTypes.ROLE_DIALOG:
...
for title, objClass in PLUGIN_WINDOW_CLASSES:
if name == "Samples Missing":
clsList.insert(0, objClass)
This code is incorrect. It will insert every class in PLUGIN_WINDOW_CLASSES because you're not checking against title. Even if it were correct, it isn't a good idea because it will allow the other plugin classes to be used for dialogs, which they should never be. This is why I made the code suggestion I did. That way, it applies only to dialogs of the required name. You shouldn't add it to PLUGIN_WINDOW_CLASSES either.

As to my Python functions question earlier, I'm busy going through the
Python 2.7.3 documentation now. Hopefully it'll help me with what I'm
trying to implement.
You should also file a feature request at:
http://bugs.launchpad.net/nvda-sonar

Jamie

--
James Teh
Email/MSN Messenger/Jabber: jamie@xxxxxxxxxxx
Web site: http://www.jantrid.net/
Twitter: jcsteh


References