From: Brian G. L. d. <bg...@li...> - 2011-06-30 07:39:07
|
This error gets triggered if IE closes under some circumstances by the way, due to this fix I imagine. Should not matter once beeps are suppressed in the release though. This error happens presumably as the system has not noticed that ie has been asked to close. IO - inputCore.InputManager.executeGesture (12:09:29): Input: kb(desktop):alt+f4 IO - speech.speak (12:09:29): Speaking [u'Taskbar'] IO - inputCore.InputManager.executeGesture (12:09:31): Input: kb(desktop):windows+m DEBUG - appModuleHandler.update (12:09:31): application iexplore closed ERROR - eventHandler.executeEvent (12:09:31): error executing event: gainFocus on <NVDAObjects.IAccessible.sysListView32.ListItem object at 0x01CAE4F0> with extra args of {} Traceback (most recent call last): File "eventHandler.pyc", line 131, in executeEvent File "eventHandler.pyc", line 144, in doPreGainFocus File "api.pyc", line 116, in setFocusObject File "treeInterceptorHandler.pyc", line 44, in cleanup File "treeInterceptorHandler.pyc", line 51, in killTreeInterceptor File "virtualBuffers\__init__.pyc", line 528, in terminate AttributeError: 'NoneType' object has no attribute '_vbufRememberedCaretPositions' Brian bg...@li... Brian Gaff's other account. ----- Original Message ----- From: "NV Access bazaar commits" <nor...@nv...> To: <nvd...@li...> Sent: Thursday, June 30, 2011 6:02 AM Subject: [NVDA-dev] Branch nvda/main: Rev 4516: VirtualBuffer: When changing pages in IE (and perhaps other cases), the buffer is cleared before we call terminate() and the caret position is set to 0 accordingly, which means that we always remember the last caret position as being the top of the page. > At http://bzr.nvaccess.org/nvda/main > > ------------------------------------------------------------ > revno: 4516 > revision-id: ja...@ja...-20110630050222-3wagvv2ons5uolmk > parent: ja...@ja...-20110630023507-qy9drun3e904bn1v > fixes bug(s): http://www.nvda-project.org/ticket/1604 > committer: James Teh <ja...@ja...> > branch nick: main > timestamp: Thu 2011-06-30 15:02:22 +1000 > message: > VirtualBuffer: When changing pages in IE (and perhaps other cases), the > buffer is cleared before we call terminate() and the caret position is set > to 0 accordingly, which means that we always remember the last caret > position as being the top of the page. > Therefore, save the last caret position when the caret is moved by the > user or an event (in _set_selection) and remember that when terminating. > Fixes remembering of the last position on pages in IE. > -------------------------------------------------------------------------------- > === modified file 'source/virtualBuffers/__init__.py' > --- a/source/virtualBuffers/__init__.py 2011-06-08 03:39:10 +0000 > +++ b/source/virtualBuffers/__init__.py 2011-06-30 05:02:22 +0000 > @@ -511,6 +511,7 @@ > self.documentConstantIdentifier = self.documentConstantIdentifier > if not hasattr(self.rootNVDAObject.appModule, > "_vbufRememberedCaretPositions"): > self.rootNVDAObject.appModule._vbufRememberedCaretPositions = {} > + self._lastCaretPosition = None > > def prepare(self): > self.shouldPrepare=False > @@ -523,13 +524,8 @@ > if not self.VBufHandle: > return > > - if self.shouldRememberCaretPositionAcrossLoads: > - try: > - caret = self.selection > - caret.collapse() > - > self.rootNVDAObject.appModule._vbufRememberedCaretPositions[self.documentConstantIdentifier] > = caret.bookmark > - except: > - pass > + if self.shouldRememberCaretPositionAcrossLoads and > self._lastCaretPosition: > + > self.rootNVDAObject.appModule._vbufRememberedCaretPositions[self.documentConstantIdentifier] > = self._lastCaretPosition > > self.unloadBuffer() > > @@ -700,6 +696,12 @@ > super(VirtualBuffer, self)._set_selection(info) > if isScriptWaiting() or not info.isCollapsed: > return > + # Save the last caret position for use in terminate(). > + # This must be done here because the buffer might be cleared just before > terminate() is called, > + # causing the last caret position to be lost. > + caret = info.copy() > + caret.collapse() > + self._lastCaretPosition = caret.bookmark > if config.conf['reviewCursor']['followCaret'] and > api.getNavigatorObject() is self.rootNVDAObject: > api.setReviewPosition(info) > if reason == speech.REASON_FOCUS: > > -------------------------------------------------------------------------------- > _______________________________________________ > NVDA-dev mailing list > NVD...@li... > http://lists.nvaccess.org/listinfo/nvda-dev > |