CLIM mail archive

[Prev][Next][Index][Thread]

Using DEFINE-COMMAND




I am using CLIM 0.9.54 to define a system that is not
an application per se, but rather a toolbox that gets
embedded in other applications.  One of the things that
the applications inherit is of course a command table.

What is the "canonical" way to define commands that
are not associated with any single application?  I started
off doing something like

(define-command com-print-number
	((object 'number))
  (print object))

(add-command-to-command-table "Print Number"
          'com-print-number 'my-comtab)

But one quickly discovers that EXECUTE-COMMAND funcalls
the command using the application frame as a first, hidden
argument.  (WHY?)  It would appear that I should be using
DEFINE-FRAME-COMMAND instead, which adds the hidden frame
argument invisibly:

(define-frame-command my-comtab com-print-number
	((object 'number))
  (print object))

I suppose it makes sense to have the frame as a hidden
argument, since there is no special binding such as
dw:*program-frame*.  So should user code ever invoke
DEFINE-COMMAND?

Thanks,

jeff morrill
jmorrill@bbn.com

0,,

Follow-Ups:

Main Index | Thread Index