• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Auto complete accepts on space, any way to change?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto complete accepts on space, any way to change?


  • Subject: Re: Auto complete accepts on space, any way to change?
  • From: Ross Carter <email@hidden>
  • Date: Sat, 29 Aug 2009 13:04:21 -0400


On Aug 28, 2009, at 12:02 PM, Ben Lachman wrote:

My app, SousChef, uses the AppKit autocomplete functionality in a bunch of places. Currently if a user types "So" they are presented with a list of completions and the first actual completion ("Soup") is used inline and selected so that this completed part is used if the user tabs to the next item but isn't if the user keeps typing (e.g. "up" is selected, "So" is not). However in recently we've noticed that if you are typing through an autocomplete and hit space, the current completion is accepted and the space is appended to it. This is unwanted behavior. However in Safari's location bar, which has the functionality I want, if you hit space, the space is appended to the partial word instead of the full completion. Anyone have an idea of how to get this behavior of just accepting on enter/tab (cancel on escape already works)? Currently I'm only implementing - textView:completionsForPartialWordRange:indexOfSelectedItem:. I thought to override keyDown: but the problem is that the field editor is eating keystrokes.

I guess your field editor could override complete: and not call super if the user has just typed a space.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Auto complete accepts on space, any way to change? (From: Ben Lachman <email@hidden>)

  • Prev by Date: Re: Normalize an NSAttributedString
  • Next by Date: Re: libcrypto on Snow Leopard
  • Previous by thread: Auto complete accepts on space, any way to change?
  • Next by thread: Snow leopard build number
  • Index(es):
    • Date
    • Thread