[nvda-addons] Re: SPL revision

  • From: "Joseph Lee" <joseph.lee22590@xxxxxxxxx>
  • To: <nvda-addons@xxxxxxxxxxxxx>
  • Date: Mon, 6 Oct 2014 20:57:08 -0700

Hi,
1. Mesar told me that Global Vars should be used to let the add-on run in
temporary copy. You might want to do git pull.
2. Yes, I plan to remove the docstring for the connection script.
3. I don't want to bother with validator code, as one of the technical
changes is that add-on authors ourselves need to provide the routine due to
config management changes last year (Jamie knows more about this). In this
case, I use dictionaries for convenience to act as a "runtime copy" of the
config file and to reduce unnecessary disk writes.
4. Readability and style: the code:
if:
        # comment
        ui.message("something to say")
else:
        # Some other comment
It was Mesar's style, so I copied his. Translator comments in NVDA core are
implemented in a similar fashion, although I do understand that consistency
is something all of us should strive for in the end.
Thanks for the review.
Cheers,
Joseph
 
-----Original Message-----
From: nvda-addons-bounce@xxxxxxxxxxxxx
[mailto:nvda-addons-bounce@xxxxxxxxxxxxx] On Behalf Of Noelia
Sent: Monday, October 6, 2014 8:46 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] SPL revision

Hi Joseph and all:

I reviewed the plugin of SPL yesterday. I don't have StationPlaylist
installed, so I can't test it.
I have some questions:
1 Both globalVars and getUserDefaultConfigPath are used. Is this a good mix?
Perhaps it doesn't work on temporary copies of NVDA.
2. There was a class (like SamEncoder) who use gesture.send without removing
the ._doc__ of scripts, so potentially they could be changed.
3 I have never use just a dictionary in configuration files. I use configobj
in conjunction with validate.Validator. Does it work properly like that? I
haven't tested it.
4. About readability, I saw more than three blank lines between different
two sections of the plugin. Though I don't know too many things about this:
before I created JAWS scripts, very frequently just for my own ussage, not
for sharing, so I learned to share code almost just here.
I have seen, in the same function, sentences separated in different lines
and other in the same, for instance:
if ... : ...
else:
# Comment for translator.
...
I think it would be better not to use these kind of different styles to
write in the same function.
Thoughts.
Thanks.
----------------------------------------------------------------

NVDA add-ons Central: A list for discussing NVDA add-ons

To post a message, send an email to nvda-addons@xxxxxxxxxxxxx.

To unsubscribe, send an email with the subject line of "unsubscribe"
(without quotes) to nvda-addons-request@xxxxxxxxxxxxx.

If you have questions for list moderators, please send a message to
nvda-addons-moderators@xxxxxxxxxxxxx.

Community addons can be found here: http://addons.nvda-project.org

----------------------------------------------------------------

NVDA add-ons Central: A list for discussing NVDA add-ons

To post a message, send an email to nvda-addons@xxxxxxxxxxxxx.

To unsubscribe, send an email with the subject line of "unsubscribe" (without 
quotes) to nvda-addons-request@xxxxxxxxxxxxx.

If you have questions for list moderators, please send a message to 
nvda-addons-moderators@xxxxxxxxxxxxx.

Community addons can be found here: http://addons.nvda-project.org

Other related posts: