Re: [orca-list] I need help
- From: José Vilmar Estácio de Souza <vilmar informal com br>
- To: Joanmarie Diggs <joanmarie diggs gmail com>
- Cc: orca <Orca-list gnome org>
- Subject: Re: [orca-list] I need help
- Date: Tue, 18 May 2010 21:44:35 -0300
Hi Joanie.
Let me try to explain.
When I press the F11 key eclipse starts my application, suspends the
execution in the first line of the main method and put the cursor in
that line.
At that moment orca receives an event of object:text-caret and the
function _presentTextAtNewCaretPosition is executed.
Inside this function I have the following sequence of statements:
obj = otherObj or event.source
[line, caretOffset, startOffset] = self.getTextLineAtCaret(obj)
print "obj = ", line, caretOffset, startOffset
if self._lastTextCaretMoved:
[line, caretOffset, startOffset] =
self.getTextLineAtCaret(self._lastTextCaretMoved)
print "self._lastTextCaretMoved = ", line, caretOffset,
startOffset
self.sayLine(obj)
self._lastTextCaretMoved = obj
These statements are executed and the terminal where I'm running orca
appears the following text:
boolean restart = true;
The text in the console is produced by the execution of the first print
statement. The second print statement is not executed because the
variable self._lastTextCaretMoved was initialized in the __init__ to None.
The last two statements are executed and the variable
self._lastTextCaretMoved stores the variable obj.
obj and self._lastTextCaretMoved points to the same place, "
boolean restart = true;".
Now I press the F6 key.
Eclipse executes the first line of the main method, suspends the
execution and put the cursor in the second line of the main method.
Again orca receives an event of object:text-caret and the function
_presentTextAtNewCaretPosition is executed.
The two prints statements present in the function
_presentTextAtNewCaretPosition are executed and the following appears in
the terminal:
System.out.println("line 1");
System.out.println("line 1");
I think I should see the following:
System.out.println("line 1");
boolean restart = true;
do not know if I could explain clearly because my English is not very good.
Thank you for your great help.
On 05/18/2010 04:01 PM, Joanmarie Diggs wrote:
Hey José.
Which suggests one of two things are going on:
* Duplicate events
According to debug output, only one object:text-caret-moved was generated.
Ah. My bad. I guess I was still thinking of an earlier example in which
you did seem to be getting multiple caret-moved events.
I'm afraid I need to reinstall Eclipse -- or install it in OpenSolaris,
which might make more sense -- because an early, don't-try-this-at-home
Maverick update on my laptop resulted in my having to reinstall Ubuntu.
Eclipse was a casualty of that. But I digress....
Until I have Eclipse set up again, I'm admittedly having to make some
educated guesses. Looking at your earlier message, you say:
To debug in eclipse I press F11 to start and press F6 to step over.
What is happening is that the two commands print show the same result as
if the two objects were the same.
Why do you think they're not the same? Why can't it be that you're
getting a single(?) caret-moved event from Eclipse to say "hey, now I'm
at the breakpoint at line 1000." and then, as a result of F6, "now I'm
at the breakpoint at line 1200." And so on? In other words, you're in
one file, you've got one caret, and that caret is moving to a new
location in the same file each time you press F6.
Maybe once I reinstall Eclipse and take a look myself, I'll realize that
I'm asking very dumb questions, at which point I will apologize
profusely for being an idiot.<smile> But at this moment, conceptually,
I'm not following your logic about why your findings are problematic.
If I press F5 to step into a function that is present in other file, the
first print shows the line of the new file and the second print shows
the line of the previous file.
Again, thinking about it but not actually looking at it, this suggests
that there are two separate carets, each one belong to its own text
object.
If I'm being dense, feel free to tell me to just go install Eclipse.
<smile> Which I'll try to do this evening after my DayJob. (Does it
matter what version? You have a link so that I can have the exact same
version that you do?)
Take care.
--joanie
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]