After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 462650 - Traceback when using whereAmI in Evolution New Contact dialog
Traceback when using whereAmI in Evolution New Contact dialog
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.19.x
Other All
: Normal normal
: 2.20.0
Assigned To: Joanmarie Diggs (IRC: joanie)
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-02 00:52 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2008-07-22 19:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
proposed patch (1.30 KB, patch)
2007-08-02 00:56 UTC, Joanmarie Diggs (IRC: joanie)
none Details | Review
D'oh! Also check for nextObj and nextObj.text. (2.37 KB, patch)
2007-08-03 19:11 UTC, Joanmarie Diggs (IRC: joanie)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2007-08-02 00:52:50 UTC
Steps to reproduce:

1. Launch Evolution
2. Press Control Shift C for a New Contact
3. With focus in the Full Name entry, press KP_Enter for whereAmI

Expected results:  Orca would announce your present location

Actual results:  Orca says nothing and the following error is generated:

Traceback (most recent call last):
  • File "/usr/lib/python2.5/site-packages/orca/input_event.py", line 182 in processInputEvent
    consumed = self._function(script, inputEvent)
  • File "/usr/lib/python2.5/site-packages/orca/default.py", line 1958 in whereAmI
    return self.whereAmI.whereAmI(obj, doubleClick, orcaKey)
  • File "/usr/lib/python2.5/site-packages/orca/where_am_I.py", line 123 in whereAmI
    self._speakText(obj, doubleClick)
  • File "/usr/lib/python2.5/site-packages/orca/where_am_I.py", line 460 in _speakText
    self._getTextContents(obj, doubleClick)
  • File "/usr/lib/python2.5/site-packages/orca/where_am_I.py", line 1160 in _getTextContents
    [current, other] = self._hasTextSelections(obj)
  • File "/usr/lib/python2.5/site-packages/orca/scripts/Evolution.py", line 118 in _hasTextSelections
    if prevObj.text.getNSelections() > 0:
AttributeError: 'NoneType' object has no attribute 'text'

Comment 1 Joanmarie Diggs (IRC: joanie) 2007-08-02 00:56:17 UTC
Created attachment 92892 [details] [review]
proposed patch

check for prevObj and prevObj.text before calling text.getNSelections()

Mike please test.  Thanks!
Comment 2 Mike Pedersen 2007-08-03 16:44:51 UTC
This patch seems to work in all places except for the email pane.  If you press "whereamI" in any of the email fields you will get no feedback from orca.
Comment 3 Joanmarie Diggs (IRC: joanie) 2007-08-03 19:11:16 UTC
Created attachment 93054 [details] [review]
D'oh! Also check for nextObj and nextObj.text.

Mike this fixes that issue for me.  Could you please verify?

Rich, I think I feel about Evolution.py the same way you feel about Gecko.py. ;-)  Null checks are harmless, of course.  But what I'm wondering is this:  Is there a case in _hasTextSelections() where we don't have a prevObj (or a nextObj) but want to do *something* else before moving on?  If you can't think of one and this solves the issue for Mike, I'll check it in.
Comment 4 Rich Burridge 2007-08-03 19:19:20 UTC
> Is there a case in _hasTextSelections() where we don't have a prevObj (or a
> nextObj) but want to do *something* else before moving on?

Can't think of one.

If Mike is happy, I think you are good for checking it in. 
Thanks for asking though. ;-)
Comment 5 Mike Pedersen 2007-08-03 20:12:30 UTC
works great now.  thanks 
Comment 6 Joanmarie Diggs (IRC: joanie) 2007-08-03 20:56:18 UTC
Thanks guys.  This being a bug fix I committed it to both the 2.20 branch and trunk.  Moving to pending.
Comment 7 Mike Pedersen 2007-08-07 00:44:55 UTC
I think this one is OK to close now.
Comment 8 Joanmarie Diggs (IRC: joanie) 2007-08-07 01:04:51 UTC
Sounds good.  Thanks!  Closing as FIXED.