Re: [orca-list] help debugging a problem



Hi Joanie.
Can we say that the problem is in eclipse?

On 06/28/2010 12:16 AM, Joanmarie Diggs wrote:
Hey José:

It seems to me that there is a problem with the routine getAccessibleAt.

If by "problem" you mean "Eclipse doesn't seem to always be returning
the correct AtkObject when getAccessibleAt is used," then I would agree
with you. <smile>

I just created a couple of empty projects in Eclipse and am seeing
similar issues. Here's my version of your blah() method:

~~~~~~~~~~~~
def blah(event):
    activeDescendant = event.any_data
    parentTable = event.source.queryTable()
    index = activeDescendant.getIndexInParent()
    row = parentTable.getRowAtIndex(index)
    col = parentTable.getColumnAtIndex(index)
    print "Descendant with index %d is at (%d, %d)" % (index, row, col)
    cell = parentTable.getAccessibleAt(row, col)
    cellIndex = cell.getIndexInParent()
    if cellIndex != index:
        print "ERROR: wrong child returned. Index should be %d; got: %d" % \
              (index, cellIndex)
~~~~~~~~~~~~

And sample output. I started at the top of the tree and just kept
pressing Down Arrow. Everything seems fine until row 7. Note that row 7
is where you cross from an file at level 6 from the first project into
the new project:

Descendant with index 1 is at (0, 0)
Descendant with index 3 is at (1, 0)
Descendant with index 5 is at (2, 0)
Descendant with index 7 is at (3, 0)
Descendant with index 9 is at (4, 0)
Descendant with index 11 is at (5, 0)
Descendant with index 12 is at (6, 0)
Descendant with index 2 is at (7, 0)
ERROR: wrong child returned. Index should be 2; got: 1
Descendant with index 4 is at (8, 0)
ERROR: wrong child returned. Index should be 4; got: 1
Descendant with index 6 is at (9, 0)
ERROR: wrong child returned. Index should be 6; got: 1
Descendant with index 8 is at (10, 0)
ERROR: wrong child returned. Index should be 8; got: 1
Descendant with index 10 is at (11, 0)
ERROR: wrong child returned. Index should be 10; got: 1
Descendant with index 13 is at (12, 0)
ERROR: wrong child returned. Index should be 13; got: 1
Descendant with index 14 is at (13, 0)
ERROR: wrong child returned. Index should be 14; got: 1

HTH!
--joanie




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]