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

Re: Instant smooth searching


  • Subject: Re: Instant smooth searching
  • From: todd ransom <email@hidden>
  • Date: Wed, 30 Mar 2005 09:08:27 -0700

I have a sample project that does filtering and searching exactly as you describe at http://returnself.com/code.php. It is based on the filtering array controller on mmalc's page at http://homepage.mac.com/mmalc/CocoaExamples/controllers.html

Of course the "instant" part will depend on what your search routine is doing.

hope that helps,
TR

On Mar 30, 2005, at 12:19 AM, Tom Birch wrote:

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

_______________________________________________ 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: Tom Birch <email@hidden>
References: 
 >Instant smooth searching (From: Tom Birch <email@hidden>)

  • Prev by Date: Re: NSOpenPanel and new directories?
  • Next by Date: Re: Nested sheets
  • Previous by thread: Instant smooth searching
  • Next by thread: Re: Instant smooth searching
  • Index(es):
    • Date
    • Thread