CLIM mail archive


Thanks...and More Questions About Command Tables

    Date: Wed, 20 Nov 1991 14:42 CST
    From: Scott McKay <>

    Oh, by the way, if you add the :GESTURE option to these two command

	(define-command (e3-select :command-table e3-index)
	    ((article 'e3-article :GESTURE :SELECT))
	  (with-slots (selected-article selected-part) *application-frame*
		      (setf selected-article article)
		      (setf selected-part selected-article)
		      (setf (frame-command-table *application-frame*)
			    (find-command-table 'e3-article))
		      (set-frame-layout *application-frame* 'e3-article-layout)))

	(define-command (e3-select-part :command-table e3-article)
	    ((part 'e3-part :GESTURE :SELECT))
	  (with-slots (selected-part) *application-frame*
		      (setq selected-part part)))

    ...then DEFINE-COMMAND will write these two translators for you, and
    you won't need to do it explicitly yourself.

	(define-presentation-to-command-translator e3-select-icon
	    (e3-article e3-select e3-index)

	(define-presentation-to-command-translator e3-select-schema
	    (e3-part e3-select-part e3-article)

According to the documentation, :GESTURE NIL in this position implies
"no translator at all" rather than its usual meaning of "a translator
with no gesture (i.e., appearing only in the click-right menu)".  I
assume that to get the latter behavior one must indeed write the two
translators specifically.

	Lawrence G. Mayka
	AT&T Bell Laboratories

Standard disclaimer.

Follow-Ups: References:

Main Index | Thread Index