CLIM mail archive

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

two questions revisited




    Two questions:

> You haven't said what system you are using.  I'll repeat my quarterly
> request to everyone on this list to explicitly say something like "CLIM
> 1.1 under Allegro Common Lisp 4.0.2".  Thanks.

So here I'm trying again.

I'm using CLIM 1.0 and MCL 1.0 (both beta). First I define som
presentation types and a present method:

(clim:define-presentation-type model-&-label ())

; (defclass node (model-&-label)) ; make node a subclass of model-&-label
(clim:define-presentation-type node ())

(clim:define-presentation-method clim:present
  (obj (type model-&-label) stream (view clim:textual-view) &key)
  (print-without-type obj stream))

Then I make an accept method, which is supposed to get a value from a
homemade cut-buffer:

(clim:define-presentation-method clim:accept
  ((type model-&-label) stream (view clim:textual-view) &key)
  (let* ((view (frame-view clim:*application-frame*))
         (graph (view-graph view)))
    (let ((chosen-object (get-chosen-object view type))) ; look in cut-buffer
      (if (and *use-objects-when-accepting-p* chosen-object)
        (progn (unchoose-object view chosen-object)
               (clim:presentation-replace-input stream chosen-object type view)
		; ^^^^^^^^^^^^^^^^^^^^^^^^^^ does not use my present-method
               (values chosen-object))
        (values ; if no value in cut-buffer use standard completion
         (clim:completing-from-suggestions (stream)
            (mapc #'(lambda (graph-object)
                      (clim:suggest (ensure-label graph-object) graph-object))
                  (complete-from-graph-object graph type)))))
      )))

As state in the code, clim:presentation-replace-input does not use my
own present method but one that calls print-object. Using present with
the same argument works but then the output of course isn't put into
the input-buffer. Help!

    2. The command line echoes the argument list when I type <space> after
    entering the command name. How can I prevent that behaviour?

> What "argument list"?  Please describe this more specifically.

My second problem concerns the command line: When pressing <space>
after entering" Beep Object" CLIM outputs "(node-or-edge)", i.e. a
kind of prompt for either *one* argument or the *whole* argument-list.
The command line looks like this:

Command: Beep Object (node-or-edge) <here is the caret>

This is the definition of the command:

(define-view-frame-command (com-beep-object :name t)
                           ((node-or-edge '(or node edge))) ; 'model-&-label))

Can I prevent the output of "(node-or-edge)"?

Thanks!

Hallvard Traetteberg
Dept. of Knowledge Based Systems
Center for Industrial Research
Box 124 Blindern, 0314 Oslo 3
NORWAY

Tlf: +47 2 45 20 10
Fax: +47 2 45 20 40
Email: haltraet@si.no


Follow-Ups:

Main Index | Thread Index