[orca-list] help debugging a problem



Hi all.

I am trying to solve Bug 525316.
To do this I decided to create a small program to simulate the logic
used on orca but I don't know how to get the label associated to a cell.

Here is the program:
#!/usr/bin/python
import pyatspi

def blah(event):
    obj = event.any_data
    parentTable = obj.parent.queryTable()
    index = event.detail1
    row = parentTable.getRowAtIndex(index)
    column = parentTable.getColumnAtIndex(index)
    print row, column, parentTable.nColumns, obj.getIndexInParent(), index
    for i in range(0, parentTable.nColumns):
        cell = parentTable.getAccessibleAt(row, i)
        if not cell:
            continue
        state = cell.getState()
        print cell

pyatspi.Registry.registerEventListener(blah,
"object:active-descendant-changed")
pyatspi.Registry.start()


Any idea?
Thanks.



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