• 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
Instant smooth searching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Instant smooth searching


  • Subject: Instant smooth searching
  • From: Tom Birch <email@hidden>
  • Date: Wed, 30 Mar 2005 17:19:53 +1000

I'm trying to implement searching ala iTunes, Xcode API documentation, etc, for my NSArrayController. I've subclassed it to override the arrangeObjects: method to filter the array, and I'm trying to figure out how to connect the search string to the array controller. I'm getting really frustrated with the two outcomes...

1) I use target/action and implement a method in the array controller subclass, and whenever I type a key into the search field, about 0.5sec later the search is reflected in my NSTableView

or

2) I use bindings to bind the value of the search field to the search string in the array controller (the setSearchString method also calls rearrangeObjects). This causes the NSTableView to update instantly (no delay whatsoever) but also results in the search field resigning firstResponder status after a single key stroke, so to enter multiple keystrokes (ie a word) i have to keep clicking in it for each character.

How can I have instantaneous updating of the NSTableView without this silly firstResponder issue? Ie how can I make it behave just like iTunes/Xcode

Tom

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Instant smooth searching
      • From: todd ransom <email@hidden>
  • Prev by Date: Re: Creating controls dynamically
  • Next by Date: Re: Creating controls dynamically
  • Previous by thread: Re: Spell checker bug?
  • Next by thread: Re: Instant smooth searching
  • Index(es):
    • Date
    • Thread