[ENH] command-q completion alphabetized
Andrew P. Black
apb at cse.ogi.edu
Mon Apr 23 16:15:47 UTC 2001
It has long irked me that when I type command-q to get selector
completion, the suggestions are in apparently random order.
(Actually, it's the order of the hash method on Symbols.)
The attached changeset fixes this. It has a side effect: in order to
sort all of the suggestions, the code has to find them all when
command-q is first typed. This takes a just perceptible amount of
time, at least on my G3. However, I have added a cache so that
second and subsequent command-qs are lightning fast.
Because this changes the existing behaviour, I have flagged it as an
ENH not as a FIX. Some may not like it. I suppose that the sorting
could be a preference, but I just couldn't see adding a help balloon
that reads "Checking this box will randomize the order in which
command-q suggests completions to incomplete selectors and globals"
;-)
ChangeSet attached. The new code is also more readable, I believe,
and I got to remove a method (WeakSet>>do:after) that was there just
to support the old code.
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Cmd-qFixes.1.cs
Type: application/octet-stream
Size: 3200 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010423/5aa194e5/Cmd-qFixes.1.obj
More information about the Squeak-dev
mailing list
|