single line auto-completion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

single line auto-completion

Ross Boylan-2
How can I get autocompletion working with single line input fields,
preferably the default InputField?

I believe tab is being interpreted as go to the next field rather than
autocomplete.  I tried disabling the "can tab" property on the details
tab, but it didn't help.

Tracing through, the single line view uses an InputBoxController while
the multiline view uses ParagraphEditor, a superclass of
InputBoxController.  The two have different implementation of
processTabKey:.  It looks as if a nil tabBlock in the controller might
be sufficient to trigger completion behavior in the InputBoxController.

I'd be happy to have completion work off some other key sequence, but I
gather that's tricky with the autocompletion framework.


Thanks.
Ross Boylan

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: single line auto-completion [solved]

Ross Boylan-2
On Sat, 2013-02-16 at 14:00 -0800, Ross Boylan wrote:

> How can I get autocompletion working with single line input fields,
> preferably the default InputField?
>
> I believe tab is being interpreted as go to the next field rather than
> autocomplete.  I tried disabling the "can tab" property on the details
> tab, but it didn't help.
>
> Tracing through, the single line view uses an InputBoxController while
> the multiline view uses ParagraphEditor, a superclass of
> InputBoxController.  The two have different implementation of
> processTabKey:.  It looks as if a nil tabBlock in the controller might
> be sufficient to trigger completion behavior in the InputBoxController.
>
> I'd be happy to have completion work off some other key sequence, but I
> gather that's tricky with the autocompletion framework.

Adding this to the application had the desired effect:
postBuildWith: aBuilder
        "This allows autocompletion to work"
        (self controllerAt: #InputField1) allowTabInText.
        ^super postBuildWith: aBuilder.

#allowTabInText sets the tabBlock to nil.

Please let me know if there are alternatives I should be considering.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc