CLIM mail archive
Re: Completion Query
>From: Scott McKay <firstname.lastname@example.org>
>Date: Mon, 14 Feb 94 17:17:31 EST
>Subject: Completion Query
> Date: Mon, 14 Feb 94 16:47:02 EST
> From: Nichael Cramer <ncramer@BBN.COM>
> In short I would like "activation" behavior something like the following:
> #\Space ==> "Complete as far as possible" (i.e. do the "normal" completion
> #\Return ==> "Accept whatever I've got, as is."
> (Basically I want it to work more or less like the pathname completion does
> on Find-File in Gnumacs.)
>Which of the completion functions are you using?
Essentially, I'm doing the following:
(clim:define-presentation-method clim:accept ((TYPE my-prestype) STREAM
VIEW &key DEFAULT DEFAULT-TYPE)
VIEW DEFAULT DEFAULT-TYPE
#'(lambda (STRING ACTION)
;;; :allow-any-input t
>I think you want to use #\Return as your activation gesture, and
>#\Space as a "partial completer" (known as the "delimiter" in some opf
>the completion functions).
As always, thanks; but this doesn't seem to really address the problem I'm
trying to solve (perhaps I'm missing the point).
1] If I understand "partial completers" or "delimiters" they define the
delimiters for "sub-strings" on which completion is allowed. For exmample
defining "-" as a "delimiter" would allow me to type "F-B-B" when I want to
complete on the name "FOO-BAR-BAZ".
I use this feature, but it doesn't seem to help with the problem described
2] Furthermore, using any of the activation gestures in the standard way
still leaves the "unwanted completion" problem.
For example, suppose "FOOBAR" is a completable name. If I type "FOO" and
hit return, I'd like to get *only* "FOO" back. However, the way it works
now, I automatically get the (completed) "FOOBAR".
Again, the behavior I'm trying to achieve is something like the following:
If I type "FOO" and hit (say) space, I'd expect it to complete to "FOOBAR"
(but not neccessarily return the value). On the other hand if I type "FOO"
and hit return, I'd like it to return just "FOO".
Using the example code above, the _only_ thing I can get it to return is a
fully completed symbol-name.
Main Index |