This method should be implemented in subclasses that want to validate user changes to a string in a field, where the user changes are not necessarily at the end of the string, and preserve the selection (or set a different one, such as selecting the erroneous part of the string the user has typed).
Original signature is '- (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr originalString:(NSString *)origString originalSelectedRange:(NSRange)origSelRange errorDescription:(NSString **)error'
Available in Mac OS X v10.0 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public virtual bool IsPartialStringValidProposedSelectedRangeOriginalStringOriginalSelectedRangeErrorDescription( out NSString partialStringPtr, ref NSRange proposedSelRangePtr, NSString origString, NSRange origSelRange, out NSString error )
Public Overridable Function IsPartialStringValidProposedSelectedRangeOriginalStringOriginalSelectedRangeErrorDescription ( _ <OutAttribute> ByRef partialStringPtr As NSString, _ ByRef proposedSelRangePtr As NSRange, _ origString As NSString, _ origSelRange As NSRange, _ <OutAttribute> ByRef error As NSString _ ) As Boolean
public: virtual bool IsPartialStringValidProposedSelectedRangeOriginalStringOriginalSelectedRangeErrorDescription( [OutAttribute] NSString^% partialStringPtr, NSRange% proposedSelRangePtr, NSString^ origString, NSRange origSelRange, [OutAttribute] NSString^% error )
Parameters
- partialStringPtr (NSString%)
- The new string to validate.
- proposedSelRangePtr (NSRange%)
- The selection range that will be used if the string is accepted or replaced.
- origString (NSString)
- The original string, before the proposed change.
- origSelRange (NSRange)
- The selection range over which the change is to take place.
- error (NSString%)
- If non-nil, if validation fails contains an NSString object that describes the problem.
Return Value
YES if partialStringPtr is acceptable, otherwise NO.
Version Information
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)