[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
>What's the best way to accomplish the following?
>i have a presentation-to-command-translator which has a :tester whose
>purpose is to make this translate only when over a certain pane of a
>dw:define-program-framework. I therefore wish to compare the window
>entering the translator with something like
> :tester ((&key window) (eq window (dw:get-program-pane 'my-pane))).
You can check to see if you are in the right program:
:tester ((&key window)
(and (boundp 'dw:*program-frame*)
(typep (send dw:*program-frame* :program)
(eq window (dw:get-program-pane 'my-pane))))
This will work but there is a hitch. Do not use dw:*program* instead
of dw:*program-frame* because it will blow up if you use the
presentation inspector. There is a bug in the PI. The PI evaluates
testers with dw:*program-frame* bound to its own frame and therefore
claims that your translator is not applicable when it really is.
... andreas ..:-).