Platforms to show: All Mac Windows Linux Cross-Platform
NSTextCheckingResultMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Regular Expressions | MBS MacCocoa Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
On both iOS and macOS, instances of NSTextCheckingResultMBS are returned by the NSRegularExpression class and the NSDataDetectorMBS class to indicate the discovery of content. In those cases, what is found may be a match for a regular expression or a date, address, phone number, and so on. In macOS, instances of NSTextCheckingResultMBS are returned by the NSSpellCheckerMBS object to describe the results of spelling, grammar, or text-substitution actions.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 15 properties
- property addressComponents as Dictionary
- property components as Dictionary
- property date as Date
- property dateTime as DateTime
- property duration as Double
- property Handle as Integer
- property numberOfRanges as Integer
- property orthography as NSOrthographyMBS
- property phoneNumber as String
- property range as NSRangeMBS
- property regularExpression as NSRegularExpressionMBS
- property replacementString as String
- property resultType as Integer
- property timeZone as NSTimeZoneMBS
- property URL as String
- 7 methods
- method alternativeStrings as String()
- method Constructor Private
- method copy as NSTextCheckingResultMBS
- method grammarDetails as Dictionary()
- method rangeAtIndex(index as Integer) as NSRangeMBS
- method rangeWithName(name as string) as NSRangeMBS
- method resultByAdjustingRangesWithOffset(offset as Integer) as NSTextCheckingResultMBS
- 27 shared methods
- shared method addressCheckingResult(Range as NSRangeMBS, components as Dictionary) as NSTextCheckingResultMBS
- shared method correctionCheckingResult(Range as NSRangeMBS, replacementString as String) as NSTextCheckingResultMBS
- shared method correctionCheckingResult(Range as NSRangeMBS, replacementString as String, alternativeStrings() as String) as NSTextCheckingResultMBS
- shared method dashCheckingResult(Range as NSRangeMBS, replacementString as String) as NSTextCheckingResultMBS
- shared method dateCheckingResult(Range as NSRangeMBS, date as Date) as NSTextCheckingResultMBS
- shared method dateCheckingResult(Range as NSRangeMBS, date as Date, timeZone as NSTimeZoneMBS, duration as double) as NSTextCheckingResultMBS
- shared method dateCheckingResult(Range as NSRangeMBS, date as DateTime) as NSTextCheckingResultMBS
- shared method dateCheckingResult(Range as NSRangeMBS, date as DateTime, timeZone as NSTimeZoneMBS, duration as double) as NSTextCheckingResultMBS
- shared method grammarCheckingResult(Range as NSRangeMBS, details() as Dictionary) as NSTextCheckingResultMBS
- shared method linkCheckingResult(Range as NSRangeMBS, URL as String) as NSTextCheckingResultMBS
- shared method NSTextCheckingAirlineKey as String
- shared method NSTextCheckingCityKey as String
- shared method NSTextCheckingCountryKey as String
- shared method NSTextCheckingFlightKey as String
- shared method NSTextCheckingJobTitleKey as String
- shared method NSTextCheckingNameKey as String
- shared method NSTextCheckingOrganizationKey as String
- shared method NSTextCheckingPhoneKey as String
- shared method NSTextCheckingStateKey as String
- shared method NSTextCheckingStreetKey as String
- shared method NSTextCheckingZIPKey as String
- shared method orthographyCheckingResult(Range as NSRangeMBS, orthography as NSOrthographyMBS) as NSTextCheckingResultMBS
- shared method phoneNumberCheckingResult(Range as NSRangeMBS, phoneNumber as String) as NSTextCheckingResultMBS
- shared method quoteCheckingResult(Range as NSRangeMBS, replacementString as String) as NSTextCheckingResultMBS
- shared method replacementCheckingResult(Range as NSRangeMBS, replacementString as String) as NSTextCheckingResultMBS
- shared method spellCheckingResult(Range as NSRangeMBS) as NSTextCheckingResultMBS
- shared method transitInformationCheckingResult(Range as NSRangeMBS, components as Dictionary) as NSTextCheckingResultMBS
- 16 constants
Checking Types
Constant | Value | Description |
---|---|---|
NSTextCheckingAllCustomTypes | &hffffffff00000000 |
Checking types that can be used by clients. |
NSTextCheckingAllSystemTypes | &hffffffff |
Checking types supported by the system. The first 32 types are reserved. |
NSTextCheckingAllTypes | &hffffffffffffffff |
All possible checking types, both system- and user-supported. |
NSTextCheckingTypeAddress | 16 |
Attempts to locate addresses. Example |
NSTextCheckingTypeCorrection | 512 |
Performs autocorrection on misspelled words. |
NSTextCheckingTypeDash | 128 |
Replaces dashes with em-dashes. |
NSTextCheckingTypeDate | 8 |
Attempts to locate dates. Example |
NSTextCheckingTypeGrammar | 4 |
Checks grammar. |
NSTextCheckingTypeLink | 32 |
Attempts to locate URL links or emails. Example |
NSTextCheckingTypeOrthography | 1 |
Attempts to identify the language |
NSTextCheckingTypePhoneNumber | 2048 |
Matches a phone number. Example |
NSTextCheckingTypeQuote | 64 |
Replaces quotes with smart quotes. |
NSTextCheckingTypeRegularExpression | 1024 |
Matches a regular expression. |
NSTextCheckingTypeReplacement | 256 |
Replaces characters such as (c) with the appropriate symbol (in this case ©). |
NSTextCheckingTypeSpelling | 2 |
Checks spelling. |
NSTextCheckingTypeTransitInformation | 4096 |
Matches a transit information, for example, flight information. Example |
This class has no sub classes.
Blog Entries
- Data Detectors as context menu
- News from the MBS Xojo Plugins Version 21.1
- MBS Xojo Plugins, version 21.1pr6
- Data Detectors for Xojo
- MonkeyBread Software Releases the MBS Xojo Plugins in version 19.1
- MBS Xojo Plugins, version 19.1pr6
Xojo Developer Magazine
Release notes
- Version 21.1
- Updated NSOrthographyMBS, NSLinguisticTaggerMBS, NSLinguisticValueMBS and NSTextCheckingResultMBS for iOS.
- Version 19.1
- Added NSTextCheckingResultMBS class.
Some methods using this class:
- NSRegularExpressionMBS.firstMatch(text as string, options as Integer, range as NSRangeMBS = nil) as NSTextCheckingResultMBS
- NSRegularExpressionMBS.matches(text as string, options as Integer, range as NSRangeMBS = nil) as NSTextCheckingResultMBS()
- NSRegularExpressionMBS.replacementStringForResult(result as NSTextCheckingResultMBS, text as string, offset as Integer, template as String) as String
- NSSpellCheckerMBS.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()
- NSSpellCheckerMBS.menuForResult(TextCheckingResult as NSTextCheckingResultMBS, checkedString as string, options as Dictionary = nil, atLocation as NSPointMBS, view as NSViewMBS) as NSMenuMBS
Some events using this class:
- NSRegularExpressionMBS.enumerateMatch(text as String, options as Integer, result as NSTextCheckingResultMBS, flags as Integer, byref stop as Boolean)
- NSSpellCheckerMBS.requestCandidatesForSelectedRangeCompleted(sequenceNumber as Integer, candidates() as NSTextCheckingResultMBS, stringToCheck as String, selectedRange as NSRangeMBS, checkingTypes as Int64, options as Dictionary, tag as Variant)
- NSSpellCheckerMBS.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)
Some examples using this class:
Some related classes:
- class NSDataDetectorMBS
- class NSErrorMBS
- class NSLinguisticTaggerMBS
- class NSLinguisticValueMBS
- class NSPointMBS
- class NSRangeMBS
- class NSRegularExpressionMBS
- class NSSpellCheckerMBS
- class NSTimeZoneMBS
- class NSViewMBS
The items on this page are in the following plugins: MBS MacCocoa Plugin.
NSTextBlockMBS - NSTextContainerMBS
