• 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
Correct usage of NSTextView and NSFindBar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Correct usage of NSTextView and NSFindBar


  • Subject: Correct usage of NSTextView and NSFindBar
  • From: Martin Hewitson <email@hidden>
  • Date: Fri, 20 Sep 2013 19:00:25 +0200

Dear list,

I have an editor app which presents a list of files that can be edited. Selecting a file displays the text contents in an NSTextView subclass. On 10.7 and later the app supports using the FindBar. Searching the currently displayed text works fine the first time the find bar is used. But if another file is selected (so that the text in the textview changes) then the find bar shows nonsensical results, as if subsequent uses are still looking at the contents of the file that where displayed when the find bar was first invoked.

Is there something I can/should do to 'reset' the find bar when the file being edited changes? I couldn't find anything in the documentation, and I couldn't figure out how to get the NSTextFinder instance that the textview is using, and even if I could, I don't see anything in the documentation to 'reset' its state, or set the string it should search.

Am I going about this all the wrong way? I thought this is one of those 'it just works' cases....

Many thanks,

Martin






_______________________________________________

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: Correct usage of NSTextView and NSFindBar
      • From: Kevin Perry <email@hidden>
  • Prev by Date: UIPickerView and multiple text fields, iOS
  • Next by Date: Re: Correct usage of NSTextView and NSFindBar
  • Previous by thread: Re: UIPickerView and multiple text fields, iOS
  • Next by thread: Re: Correct usage of NSTextView and NSFindBar
  • Index(es):
    • Date
    • Thread