List Info

Thread: Orca What happened to the Acroread script?




Orca What happened to the Acroread script?
user name
2007-03-16 07:44:01
Hi,
I tried to read a PDF-document, with no succes. All my PDF
files are no
more accessible. In earlier Orca versions they were
readable. During the
refactoring of Orca I saw a new acroread.py. 
What has happened?
Hermann


_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

Re: Orca What happened to the Acroread script?
country flaguser name
United States
2007-03-16 08:07:03
Looks like another refactoring problem.  I'll send my full
debug.out to
Rich as he's Mr. Refactor. <smile>

Thanks!!
Joanie

On Fri, 2007-03-16 at 13:44 +0100, hermann wrote:
> Hi,
> I tried to read a PDF-document, with no succes. All my
PDF files are no
> more accessible. In earlier Orca versions they were
readable. During the
> refactoring of Orca I saw a new acroread.py. 
> What has happened?
> Hermann
> 
> 
> _______________________________________________
> Orca-list mailing list
> Orca-listgnome.org
> http
://mail.gnome.org/mailman/listinfo/orca-list

_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

Re: Orca What happened to the Acroread script?
user name
2007-03-16 08:12:57
Hi Joanie,
it really seems as you said: I recompiled Orca from the 2.18
branch, and
PDF files are readable again.
Regards
Hermann


_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

Re: Orca What happened to the Acroread script?
user name
2007-03-16 09:51:42
Joanmarie Diggs wrote:
> Looks like another refactoring problem.  I'll send my
full debug.out to
> Rich as he's Mr. Refactor. <smile>
>   

Yup, I'm guilty. A couple cases of
self.isDesiredFocusedItem() need to be
orca_state.activeScript.isDesiredFocusedItem()

I've attached a new acroread.py script (untested) for you to
try.

As an aside, I think we should adjust the acroread.py script
so that
all the routines at the top, that are not part of the Script
class, are in
the subclassed Script class. I can't see a reason why they
shouldn't be, 
and that
would mean that self.isDesiredFocusedItem() would work
(which is cleaner).

I can just see Joanie going "but, but, you did exactly
this in the
StarOffice script. I was just copying you!" In that
case, those routines
are used in the subclassed SpeechGenerator and
BrailleGenerator
class, and the only way to solve this (when I initially
wrote that script)
was to put them outside the Script class. Now that we have
orca_state.activeScript, those too should probably be moved
down to
the Script class. (What do you think on the last part
Will).

_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

  
Re: Orca What happened to the Acroread script?
country flaguser name
United States
2007-03-16 10:00:20
Okay, here's the funny part:

> I can just see Joanie going "but, but, you did
exactly this in the
> StarOffice script. I was just copying you!" 

I was just having a conversation with Will via IM and pretty
much said
just that.  "but, but" and everything.   Guess
I've become
predictable....  I also said to him that I was sure there
was something
fundamental that I was missing -- and there was -- so thanks
for the
clarification!

Will also suggested that I should move all of those global
methods into
the Script class.  I'm doing that as we "speak". 
Once it's done and
tested, I'll add an acroread refactor bug and patch to
bugzilla.

_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

Re: Orca What happened to the Acroread script?
user name
2007-03-16 11:17:42
Hi All:

> StarOffice script. I was just copying you!" In
that case, those routines
> are used in the subclassed SpeechGenerator and
BrailleGenerator
> class, and the only way to solve this (when I initially
wrote that 
> script)
> was to put them outside the Script class. Now that we
have
> orca_state.activeScript, those too should probably be
moved down to
> the Script class. (What do you think on the last part
Will).

Referring to orca_state.activeScript from within a script is
not really 
a good thing to do -- the methods in a script instance can
be called 
when the script is not the activeScript.  For example, the
clock in 
gnome-panel issues events that are handled by its script
instance even 
if the clock doesn't have focus.

For the cases in question (i.e., a script module has global
functions in 
it), I think the functions should be moved into the Script
subclass in 
the script module. In addition, they should refer to
"self" (not 
orca_state.activeScript).  Finally, since the speech and
braille 
generators have knowledge of the script that owns them, they
should 
refer to self._script and not orca_state.activeScript.  

Some of the current state of affairs, by the way, is the
result of some 
things not being in place at the time the script was
written.  The 
biggest thing being what Rich mentions above: the speech and
braille 
generators didn't have knowledge of the script that owned
them.  A 
refactor happened, however, and things can now be shuffled
around to 
make them a little cleaner.

Once we get this all resolved, very few things should refer
to 
orca_state.active_script.  The biggest remaining offender is
the 
where_am_i.py module.  It probably should have knowledge of
the script 
that is using it.  We can get away with the way it refers to

orca_state.active_script for now, however, because
where_am_i is meant 
to operate on the application with focus.

Thanks!

Will

_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

Orca Acroread fix checked in (was Re: What happened to the Acroread script?)
country flaguser name
United States
2007-03-16 11:50:49
Hi Hermann, all.

I have done the refactoring Will and Rich suggested to move
all of the
global methods into the acroread.Script class.  I tested the
revised
script with a number of documents and things seem back to
normal, so the
fix has been checked in.  If I missed anything, y'all know
where to find
me. <smile>

Thanks!
Joanie

_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

Re: Orca Acroread fix checked in (was Re: What happened to the Acroread script?)
country flaguser name
Germany
2007-03-16 17:23:25
Hi all,
although the script now works, there's a minor issue:
When I start a document, I hear a lot of messages I cannot
understand, and 
which aren't there in earlier versions:
Something like "avtable splash" and "avtable
view", and at the end the word 
"document", which is also placed on my braille
display. The latter one is 
no problem but those splash etc. seems to be not neccessary;
it's only 
spoken, so I cannot remember it exactly.
Perhaps a setting problem or a minor correction of the
script is required?
Regards
Hermann
_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

Re: Orca Acroread fix checked in (was Re: What happened to the Acroread script?)
country flaguser name
United States
2007-03-16 17:31:02
Hi Hermann.

> When I start a document, I hear a lot of messages I
cannot understand, and 
> which aren't there in earlier versions:

Yeah, one of the main things the acroread script does is
eliminate 
unnecessary chattiness, of which there is unfortunately
quite a bit. 
I'm not getting the chattiness.  So I'm wondering if it has
something to 
do with the specific document you're looking at or if this
problem is 
true for all documents?  If it's the former, mind sending me
the 
document in question?  If it's the latter, mind sending me
the debug.out 
illustrating the issue?

Thanks!!
Joanie
_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

Re: Orca Acroread fix checked in (was Re: What happened to the Acroread script?)
user name
2007-03-17 11:30:21
Hi Hermann.  Thanks for the debug.out, I *think* I see
what's going on, 
but I'm CCing the list so that if I'm totally wrong Will or
Rich or 
someone can jump in and provide the correct info.
<smile>

I found these lines in what you sent me:

-------------
Traceback (most recent call last):
   File 
"/usr/lib/python2.4/site-packages/orca/focus_tracking_p
resenter.py", 
line 183, in _createScript
     [''])
   File
"/usr/lib/python2.4/site-packages/orca/scripts/acroread
.py", line 42
      <<<<<<< .mine
       ^
  SyntaxError: invalid syntax

While attempting to import scripts.acroread
Looking for toolkit script GAIL.py...
...could not find GAIL.py
NEW SCRIPT: acroread (module=orca.default)
--------------

What I believe that means is the following:

1. When you updated from svn, subversion attempted to update
your 
existing acroread.py (i.e. presumably the modified one from
Rich) to the 
brand new one (i.e. the one where I moved a bunch of
methods) and failed 
to do so.  I think that's what the
"<<<<<<< .mine" bit is all
about.

2. Because of this problem and subsequent syntax error, Orca
couldn't 
load the acroread script and instead loaded the default
script.  What we 
should be seeing on the "NEW SCRIPT" line is:

     acroread (module=orca.scripts.acroread)

As I mentioned in an earlier message, one of the things the
acroread 
script does is try to eliminate a bunch of unnecessary
chattiness.  If 
you're accessing Acrobat Reader with the default script, it
certainly 
would explain all the extra stuff you're hearing.

As for what to do:  You need to blow away your current
acroread.py and 
get a new one.  Easiest way to do that in my opinion is:

1. cd into the directory where you have Orca from svn (e.g.
~/orca).
2. rm src/orca/scripts/acroread.py
3. svn update

That will cause you to get the latest everything (you're a
"bleeding 
edge" kinda guy <smile>) plus a fresh new
acroread.py.  Then reinstall 
and I think you'll be good to go.

Let me know.  And, as always, I really appreciate all your
help!

Take care.
Joanie
_______________________________________________
Orca-list mailing list
Orca-listgnome.org
http
://mail.gnome.org/mailman/listinfo/orca-list

[1-10]

about | contact  Other archives ( Real Estate discussion Medical topics )