• 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
NSSpellChecker -ignoreWord:… for NSTextCheckingTypeGrammar?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSpellChecker -ignoreWord:… for NSTextCheckingTypeGrammar?


  • Subject: NSSpellChecker -ignoreWord:… for NSTextCheckingTypeGrammar?
  • From: Troy Stephens <email@hidden>
  • Date: Thu, 08 Aug 2013 10:41:03 -0400

Is NSSpellChecker’s “ignored words” API meant for use with grammar-checking results too?

Seems unlikely to me, and yet that’s what appears to be indicated by the documentation and apparent lack of corresponding “-ignoreGrammar…” API.

The Spelling and Grammar panel sends -ignoreSpelling: when the user clicks “Ignore” for a grammar-check result, the same as it would do for a spell-check result.  And the implementation example in the -ignoreSpelling: reference documentation unconditionally invokes -ignoreWord:inSpellDocumentWithTag:

    - (void)ignoreSpelling:(id)sender {
        [[NSSpellChecker sharedSpellChecker] ignoreWord:[[sender selectedCell] stringValue] inSpellDocumentWithTag: myDocumentTag];
    }

    https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSIgnoreMisspelledWords_Protocol/

It’s hard to tell whether the same technique is really meant to be applicable to ignored grammar results, and this bit of documentation wasn’t seen as needing updating when grammar-checking was added, or whether the documentation is in need of update.

In the absence of clear info, seems like I should take care to invoke -ignoreWord:… for spell-check results only.  If want to be able to ignore grammar results, maybe I need to maintain my own grammar “ignore” list and filter received grammar-check results based on it.

Info appreciated if anyone else has run into this.  My searching hasn’t turned up any answers.

--
Troy Stephens
Developer of TypeMetal: The Visual HTML Editor for OS X
http://coherencelabs.com/typemetal/




_______________________________________________

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: NSSpellChecker -ignoreWord:… for NSTextCheckingTypeGrammar?
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Uniquing data in Core Data
  • Next by Date: Block gets NULL-ified when animation completes
  • Previous by thread: Re: Uniquing data in Core Data
  • Next by thread: Re: NSSpellChecker -ignoreWord:… for NSTextCheckingTypeGrammar?
  • Index(es):
    • Date
    • Thread