• 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
NSComboBox, bindings, and auto-complete, oh my!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSComboBox, bindings, and auto-complete, oh my!


  • Subject: NSComboBox, bindings, and auto-complete, oh my!
  • From: Randall Meadows <email@hidden>
  • Date: Mon, 13 Oct 2008 09:19:08 -0600

I'm re-sending this, since it seems to have been truncated completely by the time it got to the list. Don't know what happened; the copy in my Sent mailbox looks just peachy.
-----


I'm helping someone with a problem concerning NSComboBox whose contents come from a binding to an NSArrayController, and is set to autocomplete.

The behavior: Window opens with combobox populated from its binding. Let's say the contents are

Doe
Jones
Smith

and the textfield contains "Jones". If we start typing "Smi" it correctly autocompletes to "Smith". HOWEVER, it doesn't *select* the item "Smith", it *edits* the current selection to be "Smith", so that the list then ends up as

Doe
Smith
Smith

Currently, there is no custom code behind this, it's all set up via IB. Do we need to implement a custom -completedString:, and a custom IB action that selects the list item that satisfies the completion? Or what?

There seems to be a real dearth of sample code for this; there are several very similar questions in the archives, but none of them were sufficiently answered (if at all).


Thanks! randy _______________________________________________

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


  • Follow-Ups:
    • Re: NSComboBox, bindings, and auto-complete, oh my!
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: keystroke logger for Mac OS X
  • Next by Date: Re: Remove help menu shortcut
  • Previous by thread: NSComboBox, bindings, and auto-complete, oh my!
  • Next by thread: Re: NSComboBox, bindings, and auto-complete, oh my!
  • Index(es):
    • Date
    • Thread