Platforms to show: All Mac Windows Linux Cross-Platform

NSTextFinderMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Controls MBS MacCocoa Plugin 18.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
An optional search-and-replace find interface inside a view, usually a scroll view.

The class serves as a controller for the standard Cocoa find bar. The NSTextFinder class interacts heavily with a client object which supports the NSTextFinderClient protocol. The client object provides access to the content being searched and provides visual feedback for a search operation.
All menu items related to finding (Find…, Find Next, Find Previous, Use Selection for Find, etc.) should have the same action, performTextFinderAction:, which gets sent down the responder chain in the standard method.

see
https://developer.apple.com/documentation/appkit/nstextfinder

Actions

Constant Value Description
kActionHideFindInterface 11 Hides the find bar interface.
kActionHideReplaceInterface 13 Displays the find bar interface including the replace functionality.
kActionNextMatch 2 The next match, if any, is displayed.
kActionPreviousMatch 3 The previous match, if any, is displayed.
kActionReplace 5 Replaces a single instance of the string.
kActionReplaceAll 4 All occurrences of the string are replaced.
kActionReplaceAllInSelection 8 Selects all matching search strings within the current selection.
kActionReplaceAndFind 6 Replaces a single instance of the string and searches for the next match.
kActionSelectAll 9 Selects all matching search strings.
kActionSelectAllInSelection 10 Replaces all occurrences of the string within the current selection.
kActionSetSearchString 7 Sets the search string.
kActionShowFindInterface 1 The find bar interface is displayed.
kActionShowReplaceInterface 12 Displays the find bar interface including the replace functionality.

This class has no sub classes.

Blog Entries

Videos

Release notes

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS MacCocoa Plugin.


NSTextFieldMBS   -   NSTextListMBS


The biggest plugin in space...