[mcclim-devel] McCLIM hint on Paolo's cliki

Christophe Rhodes csr21 at cam.ac.uk
Tue May 23 14:36:47 UTC 2006


rpgoldman at real-time.com writes:

> Paolo's cliki has the following McCLIM hint:
>
> ----------------------------------------------------------------------
>
> Order of suggestions in completion menus
>
> If you pass to complete-from-possibilities a list of suggestions such as '(("First" 1) ("Second" 2) ("Third)), they are displayed in reverse order from top to bottom in completion menus, like this:
>
> Third
> Second
> First
>
> If this is not what you want, pass a list sorted in the opposite
> order.
>
> ----------------------------------------------------------------------
>
> At the expense of causing some minor dislocation, isn't this something
> we should fix, instead of hacking around?

It would be nice, except that I think the cliki is out of date and in
fact they are presented in alphabetical order.  (I consider the
presenting in alphabetical order to be more wrong, mind you, because
it makes no sense in many contexts and is impossible to override or
revert back to the original order.)

I tested this with (in the listener)
  (in-package "CLIMI")
  (defun foo (input mode)
    (complete-from-possibilities input 
     '(("First" 1) ("Second" 2) ("Third" 3) ("Fourth" 4))
     nil :action mode))
  (with-input-editing (*standard-input*)
    (accept-using-completion 'integer *standard-input* #'foo))

and hitting C-/, which gave me the possibilities (in order) First,
Fourth, Second, Third.

> Also, is this a place where the clim specification is deficient?
> I.e., does it underspecify the behavior?  Should it tell us how a list
> of possibilities will be displayed by default (in absence of specific
> function arguments)?

It looks underspecified, yes; what does Classic CLIM do?

Cheers,

Christophe



More information about the mcclim-devel mailing list