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
NVDA doesn't handle syntax errors in user-defined gestures #1342
Comments
Comment 1 by aleksey_s on 2011-02-01 21:11 |
Comment 2 by jteh on 2011-02-01 21:40 !InputManager.loadUserGestureMap and !InputManager.loadLocaleGestureMap just need to catch configobj.!ConfigObjError and log an appropriate error message. Constructing !InputManager must never fail. Having a global object initialised at import time isn't really a problem for module doc, but it certainly is a bit strange. When I originally wrote that code, there weren't many side effects, but there are now. Therefore, it probably makes sense to have an initialize function in the module. However, this isn't actually needed to fix this bug. |
Comment 3 by aleksey_s (in reply to comment 2) on 2011-02-01 21:52
That was originally on NVDA-support list.
I think that behavior should be similar to that for config errors: show an alert with list of errors. This is more user-friendly and consistent.
May be consider moving loading of maps into standalone function? It will be nice to reload user map when reverting to saved configuration, for example.
Sure. But it's worth-doing anyway :-) |
Comment 4 by jteh (in reply to comment 3) on 2011-02-01 22:06
The errors shown by config are only validation errors. We don't validate gesture maps (there's no need; they're just strings) and there can only be one parse error. The validation part is handled separately, and currently, it just logs error messages. I guess we could make them add to a list on the gesture map or something, but that's pretty ugly. Also, even if we do show an alert for user maps, we most definitely shouldn't do it for locale maps. Those should just be logged.
They're already in standalone functions: !InputManager.loadUserGestureMap and !InputManager.loadLocaleGestureMap. |
Comment 5 by aleksey_s (in reply to comment 4) on 2011-02-01 22:24
We definitely must inform user about bad formed gesture map or errors (such as unrecognizable gesture string) as we don't provide UI for assign gestures, and error sound is turned off in final releases, so there isn't any notice for users to know that they has problems with their gesture map.
Agreed. |
Comment 6 by jteh on 2011-02-01 22:30 |
Comment 8 by aleksey_s on 2011-02-02 17:15 |
Comment 9 by jteh on 2011-02-04 01:59 |
Reported by aleksey_s on 2011-02-01 21:11
Curently, NVDA misbehaves when there is an error in user gestures.ini file. It simply does not start with a critical error.
STR:
Current results:
Expected results:
NVDA should inform user about errors in the gestures.ini file and continue loading. Similar to error handling for the config file.
The text was updated successfully, but these errors were encountered: