New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A possibility to reload appModules without NVDA restart #544
Comments
Comment 1 by aleksey_s on 2010-02-06 12:32 |
Comment 2 by jteh on 2010-02-06 21:52 |
Comment 3 by jteh on 2010-02-06 23:08 There are other issues, though. An app module (and in future, a global plugin) isn't restricted in terms of what it can do within NVDA. That is, there is no separate scripting environment like there is with a lot of other ATs. This gives us a lot of power and flexibility, but it also means that reloading could be dangerous or, at the very least, very tricky. For example, an appModule might add something to some internal structure, but when it is reloaded, it will then add it again. You might be able to get around this by having a function which gets called just before the module unloads. I wonder, though: would a keystroke to restart NVDA suit your purposes? At present, you have to press a few keystrokes, but I've often thought having a restart keystroke within NVDA. It's not quite as fast, but it's not particularly slow either. |
Comment 4 by pvagner on 2010-02-06 23:50 |
Comment 5 by aleksey_s on 2010-02-07 00:08 Peter, |
Comment 6 by jteh on 2010-03-20 05:57 |
Comment 7 by aleksey_s (in reply to comment 6) on 2010-03-20 06:20
It is OK. However, why do we need yet another function in appModule: we already have del method of appModule instance. Introducing a new global module function breaks object model a bit. |
Comment 8 by jteh on 2010-03-20 12:43 Having said that, I can't think of any reason why someone should be saving a reference to an !AppModule instance, so perhaps !del() is enough for now until we come up with use cases where it is a problem. |
Comment 9 by aleksey_s (in reply to comment 2) on 2010-09-26 06:29
It is moved to imp.reload: http://docs.python.org/dev/py3k/library/imp.html#imp.reload |
Comment 10 by aleksey_s on 2010-09-26 10:29 |
Comment 11 by jteh on 2010-09-27 22:12 |
Comment 12 by jteh on 2010-09-28 02:36 First, I'm curious as to why you decided to reload all app modules, rather than just the current app module. Having said that, this certainly isn't a problem; I'm just curious. One advantage of doing it the way you ahve is that you can reload app modules from the Tools menu, which you wouldn't be able to do if it was only the current module. Please change all user visible occurrences of appModules to "app modules" (space between, no capital m).
Knit: Docstring close quotes should generally be on their own line. Also, immediately is spelt with a double m.
I'd remove the "..." here. It makes it seem as if the user should expect "done" or similar, which you can't do as per your comment later.
I'd remove "from the disk". If you really want to keep it, change it to "from disk". You need to add a keyboard binding to the laptop layout as well. The same one will do.
I'd change the first sentence to "For the convenience of app module developers, app modules can now be reloaded without restarting NVDA." You also need to add a very short section on this to the Extra Tools section of the User Guide. Overall, great work - thanks. |
Comment 13 by jteh on 2010-09-30 07:15
This also raises another issue. Dynamically generated NVDAObject classes (name beginning with "Dynamic") will get cached. I suspect this includes app module overlay classes, which means they won't get released. We either need to stop caching dynamic classes that use app module overlays or come up with some way to remove them from the dynamic class cache. |
Comment 14 by mdcurran on 2010-12-01 05:34 |
Comment 15 by aleksey_s (in reply to comment 13) on 2010-12-01 18:06
NVDA+tab works OK.
if only to allow nice app module reloading without glitches - then it is a bad idea :-)
I am not sure how to achieve this for now, can you give some advice? |
Comment 16 by aleksey_s (in reply to comment 14) on 2010-12-01 18:09
done as well as done global plugin reloading in the same scope.
Honestly, I am lost with all that dynamic class creation/manipulation stuff. If any of you gave me advice on how to do the dynamic class cache cleanup correct, i would appreciate it. |
Comment 17 by jteh on 2011-01-05 22:32 |
Reported by aleksey_s on 2010-02-06 12:28
It is convenient to reload appModules with one keystroke instead of restarting NVDA, especeally, if one is developing an appModule and needs to test changes frequently.
The text was updated successfully, but these errors were encountered: