Re: [orca-list] I need help



Hi Joanie.

Now I press the F6 key.
Okay.

Eclipse executes the first line of the main method,  suspends the
execution and put the cursor in the second line of the main method.
If you've gone from the first line of the main method (which lives in
the text object we're calling Foo) to the second line of the main
method, my guess is that you're still in Foo. You've only moved a line,
so let's make the caret offset be 550.

Again orca receives an event of object:text-caret and the function
_presentTextAtNewCaretPosition is executed.
Right. So let me copy and paste those lines from your script.

obj = otherObj or event.source
I'm guessing otherObj is still None. Therefore obj becomes the
event.source. The event.source is the thing which emitted the
caret-moved event. If you're in the second line of the main method, the
event.source should be Foo. Thus obj becomes Foo.

LOL!
Here was my mistake.
The way I see things I was thinking that each line was a different object.
'boolean restart = true;' an object.
'System.out.println("line 1");' another object.
...
In fact they are present in the same object.
Great explanation!
Thanks again.




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