CLIM mail archive


Anybody else hitting completion errors on accept?

I'm on a SPARC using CLIM 1.0 in the Allegro lisp environment.  Has anybody
else noticed this problem with read-token?

In CLIM there is a completion bug on accept methods of presentation types.
Below is a simple example of a problem that I am having with accept using
various presentation types.

(define-your-application-command (com-test :name t)
	((number 'integer :default 100 :display-default t :provide-default t))

You die when you hit the completion character (on my particular machine,
#\tab) to get the default value into the input buffer to edit on.  However, 
if you hit #\return or #\newline then this accept will work and take the default.  But I
need the ability to throw the default into the input buffer for editting
because I have extensive time presentation types (they are in the form of 
1991-365/12:31:23.045) in which the user (being their typical lazy self) would
prefer to take the default and perform inline edits to it with fewer keystrokes
rather than typing the input from scratch.  In my accept time methods I use the
read-token function and get exactly the same type of error as the example
above illustrates.

However, I notice that if you do it in the form of ...

(define-your-application-command (com-test :name t) ()
	(accept 'integer :default 100 :display-default t :provide-default t))

Then CLIM will beep at you when you hit the completion character and not allow
you to throw the default into the input buffer.  If the user is not permitted 
to edit on the default, then it seems to me that this is a capability that
CLIM should be required to support.

With that in mind, how can I get around this shortcoming of CLIM within my
own accept methods with read-token?  I am trying to avoid going down to the
level of using read-gesture and manually manipulating the input buffer via
my own accept method.  Below is a simplified example of how I am using
the read-token function.

(define-presentation-method accept
	((type Time) stream (view textual-view) &key default)
   (declare (special *Plan-It*))
   (let ((token (read-token stream)))
      (cond ((string-equal "" token)
	     (presentation-replace-input stream default 'Time view)
	    ((My-Conversion-function-from-string-to-time token)))))


Main Index | Thread Index