Mac Developer Library

Developer

AppKit Framework Reference NSChangeSpelling Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSChangeSpelling

This protocol is implemented by objects in the responder chain that can correct a misspelled word. See the NSSpellChecker in NSSpellChecker Class Reference class description for more information.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


import AppKit @import AppKit;

Availability


Available in OS X v10.0 and later.
  • Replaces the selected word in the receiver with a corrected version from the Spelling panel. (required)

    Declaration

    Swift

    func changeSpelling(_ sender: AnyObject?)

    Objective-C

    - (void)changeSpelling:(id)sender

    Discussion

    This message is sent by the NSSpellChecker to the object whose text is being checked. To get the corrected spelling, ask sender for the string value of its selected cell (visible to the user as the text field in the Spelling panel). This method should replace the selected portion of the text with the string that it gets from the NSSpellChecker.

    Import Statement

    import AppKit

    Availability

    Available in OS X v10.0 and later.