Re: [orca-list] Please help. A beginner's elementary queries on Orca source code: Query Set 1.



Dear Jason and Jon,

Thanks a lot for putting your time and efforts in answering my queries. I am really grateful for the prompt response. Jason has clarified my query no.2 on parallel assignment. But I have not clearly understood Jon's explanation to my queries 1 and 3.

Query 1: I could not locate the functions queryText() and getTextAtOffset() at the url mentioned by Jon i.e. http://people.gnome.org/~parente/pyatspi/doc/. Another url http://people.gnome.org/~billh/at-spi-idl shows the declaration of getTextAtOffset(), but nothing of queryText(). The function details are also not found in the source code of either Orca or Python modules. So, my doubt remains. Aren't these functions part of any Python source code? Are they implemented elsewhere and only made available to Orca? What enables Orca to call them? 

Query 3: Again, after running ipython and importing pyatspi, TEXT_BOUNDARY_CHAR does show up as one of the defined constants. But I am not able to locate it in the source code of any Python module. Where is its origin, please?

Thanks and regards.

Dattatray Bhat

On Mon, Jun 14, 2010 at 5:26 PM, Jon <j orcauser googlemail com> wrote:
Dear Bhat,

I see Jason already answered your second question.

in-body reply:
On Mon 14/06/2010 at 16:10:39, Dattatray Bhat wrote:
> I am studying the implementation of flat_review commands in order to check
> if a few enhancements are possible. I am new to Orca and Python; and the
> source code confuses me quite often. I will be very much oblidged if
> experienced Orca and Python users clarify my doubts. My first set of queries
> are listed below:
>
> 1. flat_review.py calls queryText() and getTextAtOffset() functions. Where
> are these functions implemented? How can flat_review.py access the
> functions?

I might be wrong, but I think they are provided to us if they are
accessible objects.
you might find this helpful:
http://people.gnome.org/~parente/pyatspi/doc/

> 2. Function __getattr__(self, attr), in class Word, in flat_review.py has
> following assignment (line no.135-137)-
>     [char, startOffset, endOffset] = text.getTextAtOffset(self.startOffset +
> i, pyatspi.TEXT_BOUNDARY_CHAR)
>    What does the left hand side syntactically represent? A list with three
> items?
>
> 3. Look at pyatspi.TEXT_BOUNDARY_CHAR in the above statement. Where does
> TEXT_BOUNDARY_CHAR appear in pyatspi package?

also see above url,
or install "ipython" then:
$ ipython
... (some things i have cut)
In [1]: import pyatspi
In [2]: pyatspi.TEXT # press tab now and you will see the defined
constants.

Maybe it is a good idea to start on some of the easier bugs, then as you
get more familiar with the code tackle the harder once?
Do let me know if you need help picking.

> Regards.
>
> Dattatray Bhat

Looking forward to your contributions.

Regards

-Jon



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