NSSpellCheckerMBS class
Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics,
classes,
interfaces,
controls,
modules,
global methods by category,
global methods by name,
screenshots,
licenses
and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
NSSpellCheckerMBS class
The spell checker class.
The NSSpellChecker object is used by a client (e.g. a document in an application) to spell-check a given String.
There is only one NSSpellChecker instance per application (since spell-checking is interactive and you only have one mouse and one keyboard).
The string being spell-checked need only be valid for the duration of the call to checkSpellingOfString or countWordsInString.
Requires Mac OS X 10.2.
- 5 events
- event Correct
- event FindNext
- event Ignore
- event requestCandidatesForSelectedRangeCompleted(sequenceNumber as Integer, candidates() as NSTextCheckingResultMBS, stringToCheck as String, selectedRange as NSRangeMBS, checkingTypes as Int64, options as Dictionary, tag as Variant)
- event requestCheckingOfStringCompleted(sequenceNumber as Integer, results() as NSTextCheckingResultMBS, orthography as NSOrthographyMBS, wordCount as Integer, stringToCheck as String, Range as NSRangeMBS, checkingTypes as Int64, options as Dictionary, tag as Variant)
- 10 properties
- 36 methods
- method availableLanguages as string()
- method checkGrammarOfString(text as string, start as Integer, language as string, wrap as boolean) as NSRangeMBS
- method checkGrammarOfString(text as string, start as Integer, language as string, wrap as boolean, Details() as dictionary) as NSRangeMBS
- method checkSpellingOfString(text as string, start as Integer) as NSRangeMBS
- method checkSpellingOfString(text as string, start as Integer, language as string, wrap as boolean) as NSRangeMBS
- method checkSpellingOfString(text as string, start as Integer, language as string, wrap as boolean, byref WordCount as Integer) as NSRangeMBS
- method checkString(text as string, range as NSRangeMBS = nil, checkingTypes as Int64 = -1, options as Dictionary = nil, byref orthography as NSOrthographyMBS, byref wordCount as Integer) as NSTextCheckingResultMBS()
- method completionsForPartialWordRange(start as Integer, length as Integer, text as string, language as string="") as string()
- method correctionForWordRange(range as NSRangeMBS, text as string, language as string) as string
- method countWordsInString(word as string, language as string="") as Integer
- method deletesAutospaceBetweenString(precedingString as string, followingString as string, language as String = "") as Boolean
- method dismissCorrectionIndicatorForView(view as NSViewMBS)
- method forgetWord(word as string)
- method guessesForWord(range as NSRangeMBS, word as string, language as string) as string()
- method guessesForWord(word as string) as string()
- method hasLearnedWord(word as string) as boolean
- method ignoredWords as string()
- method ignoreWord(word as string)
- method languageForWordRange(range as NSRangeMBS, text as string, orthography as NSOrthographyMBS = nil) as string
- method languageMenuEntries as string()
- method learnWord(word as string)
- method menuForResult(TextCheckingResult as NSTextCheckingResultMBS, checkedString as string, options as Dictionary = nil, atLocation as NSPointMBS, view as NSViewMBS) as NSMenuMBS
- method preventsAutocorrectionBeforeString(text as string, language as String = "") as Boolean
- method recordResponse(response as Integer, correction as string, word as string, language as String = "")
- method requestCandidatesForSelectedRange(selectedRange as NSRangeMBS, stringToCheck as string, types as Int64 = -1, options as Dictionary = nil, tag as Variant = nil) as Integer
- method requestCheckingOfString(stringToCheck as string, range as NSRangeMBS, types as Int64 = -1, options as Dictionary = nil, tag as Variant = nil) as Integer
- method setIgnoredWords(words() as string)
- method setLanguage(language as string) as boolean
- method spellingPanel as NSPanelMBS
- method unlearnWord(word as string)
- method updatePanels
- method updateSpellingPanelWithGrammarString(lang as string, detail as dictionary)
- method updateSpellingPanelWithMisspelledWord(word as string)
- method userPreferredLanguages as string()
- method userQuotesArrayForLanguage(lang as string) as string()
- method userReplacementsDictionary as dictionary
- 25 shared methods
- 12 constants
Constants
Constant |
Value |
Description |
NSGrammarCorrections
|
"NSGrammarCorrections" |
One of the key constants for the dictionaries in the details array.
|
NSGrammarRange
|
"NSGrammarRange" |
One of the key constants for the dictionaries in the details array.
|
NSGrammarUserDescription
|
"NSGrammarUserDescription" |
One of the key constants for the dictionaries in the details array.
|
Correction indicator type Constants
Constant |
Value |
Description |
NSCorrectionIndicatorTypeDefault
|
0 |
The default indicator that shows a proposed correction.
Available in Mac OS X v10.7 and later.
|
NSCorrectionIndicatorTypeGuesses
|
2 |
Shows multiple alternatives from which the user may choose the appropriate spelling.
Available in Mac OS X v10.7 and later.
|
NSCorrectionIndicatorTypeReversion
|
1 |
Provides the option to revert to the original form after a correction has been made.
Available in Mac OS X v10.7 and later.
|
Response Constants
Constant |
Value |
Description |
NSCorrectionResponseAccepted
|
1 |
The user accepted the correction.
Available in Mac OS X v10.7 and later.
|
NSCorrectionResponseEdited
|
4 |
After the correction was accepted, the user edited the corrected word (to something other than its original form.
Available in Mac OS X v10.7 and later.
|
NSCorrectionResponseIgnored
|
3 |
The user continued in such a way as to ignore the correction.
Available in Mac OS X v10.7 and later.
|
NSCorrectionResponseNone
|
0 |
No response was received from the user.
Available in Mac OS X v10.7 and later.
|
NSCorrectionResponseRejected
|
2 |
The user rejected the correction by dismissing the correction indicator.
Available in Mac OS X v10.7 and later.
|
NSCorrectionResponseReverted
|
5 |
After the correction was accepted, the user reverted the correction back to the original word.
Available in Mac OS X v10.7 and later.
|
This class has no sub classes.
Some examples using this class:
Blog Entries
Xojo Developer Magazine
Release notes
- Version 19.1
- Version 17.4
The items on this page are in the following plugins: MBS MacCocoa Plugin.
NSSpeechSynthesizerMBS
-
NSSplitViewMBS