CLIM mail archive
[Prev][Next][Index][Thread]
presentation action
Allegro CL 4.1
CLIM 1.1
SunOs 4.1.1
I have a presentation action that I *don't* want applicable in certain
input contexts (clim:command-arguments). I am trying to write a
tester function to restrict the applicability of this presentation
action but am having problems with (I think) nested input contexts.
I am accepting a command line argument. When I move the mouse over a
presentation (of type essential-node), the input context as seen by
the tester function is first clim:command-arguments and then
essential-node. How do I write a tester that looks in the nested set
of input contexts to determine if we are really trying to accept a
command line argument. Why do I see the presentation type of the
thing I wave the mouse over as an input context?
Here is my presentation action.
(clim:define-presentation-action node-operation-menu
(essential-node nil graph-browser-command-table
:documentation
((object stream)
(clim:with-text-face (:bold stream)
(format stream "Node Operations for ~s" (node-pretty-name object))))
:tester
((context-type)
;; When accepting command arguments, disable this.
(not (clim:presentation-subtypep 'clim:command-arguments context-type)))
:gesture :menu)
(presentation frame window x y)
(clim:call-presentation-menu presentation
clim:*input-context*
frame
window
x y
:for-menu t
:label "Node Operations"))
Note that this is derived from the example on pg. 198. Note also that
the example uses the :tester-definitive option which (for my version
of CLIM) will not compile. It tells me that :tester-definitive is not
a valid option.
ba
Brian H. Anderson
Boeing Commercial Airplane
(206) 234-0881
bha@atc.boeing.com
0,,
Follow-Ups:
Main Index |
Thread Index