On Jun 26, 9:24 am, Robert <[email protected]> wrote:
> This is on Firefox 3.6.4, Snow Leopard (Mac), running 1.6X.0a14.
>
> In theory, I *love* the new autocomplete features that find known
> objects/variables as I start typing, but in practice it's not
> implemented very well.  This can be very aggravating, for example, if
> the $ is used in multiple cases.  Here's my test case.  First, I'm
> using jQuery, which holds a native $ function.  My end goal is to type
> '$("#selector")' in the console.  But it's very difficult in my
> scenario.  Let me outline.
>
> Steps to reproduce the problem:
> 1. I'm using jQuery, which has the function/object named '$'

Autocomplete is a more complex feature than I anticipated.

I certainly agree that the current behavior is unusable. But I don't
yet have a good alternative.

I need to change your example because I can't reproduce this first
step. So:
1) http://getfirebug.com/
2) Open firebug  use Console panel or any panel then press [=] button
3) in the command line type "d".

You now have a pop up with a few choices and the word directories with
"irectiores" in blue (selected).

Now what?

The user may want to:
   1) Accept the completion. Currently this is triggered with any
character not valid in JS identifier. For example, "." (dot). This
works great if you want to enter eg document.childNodes:
    do
    .
    ch
    space
    enter
   2) Cycle to another completion. Currently TAB. works well.
   3) Get to another completion, just type, works well
   4) Reject the completion. FAIL.  This is the case you hit.  You see
$arx with arx selected. You want "(" to mean "$(", but then how can we
accept the completion?

I tried the autocomplete in webkit, as far as I can tell it uses:
   1) Accept the completion: END key
   2) Cycle TAB
   3) Get just type
   4) any key

That is easy to implement, but I had to experiment with a lot of keys
to discover that END worked. Later I found right arrow as you suggest.

If I take out the code the recognizes identifiers, then our version
works like webkit, I guess that is what we will do. The case that
really annoys me are  ones like:
   document.childNodes.l
(ending letter ell). The completion is "length", and my brain want
"enter" to cause document.childNodes.length to be evaluated, but
instead of the number two I get "undefined" because the enter key
causes the "ength" to be erased and the evaluated expression is
"document.childNodes.l"

jjb

Is there any better solution?

> 2. I have my own built function/object named '$arx'
> 3. When I type '$' in the console, the autocomplete hint shows the two
> different options, '$' and '$arx' -- but it won't let me select the
> shorter of the two and it shows '$arx' with 'arx' highlighted in blue
> 4. Similarly, if I just type '$' and see the two selections, because
> 'arx' is highlighted in blue, if I then type '(' -- which is common in
> jQuery right after the '$' -- instead of replacing 'arx' with the open
> parenthesis, it places it *after* 'arx' -- I would think it should
> replace the highlighted 'arx' with '(' instead --
...
> Something is missing, though in the logic of autocomplete.  Instead of
> assuming it knows what you mean, the burden of completing should be
> relegated to a special key (enter?  right arrow?  tab?  command +
> enter?), instead of confusing the user who is trying to UNDO what the
> autocomplete thinks the user wants -- and might often be wrong.
>
> Further, putting in a request, but as much as I love autocomplete,
> there are times when you just want to turn it off.  Having such a
> switch would be nice.

I won't implement such an option. If we can't get a reasonable
autocomplete to work I'll just remove the feature and move on.
Optional features are just too  much work to support.

jjb

>
> Thanks very much for your time.

Thanks for the trial!

jjb

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to