MonobjcMonobjc Documented Class Library
TextViewShouldChangeTextInRangesReplacementStrings Method (textView, affectedRanges, replacementStrings)
NamespacesMonobjc.AppKitINSTextViewDelegateTextViewShouldChangeTextInRangesReplacementStrings(NSTextView, NSArray, NSArray)

Sent when a text view needs to determine if text in an array of specified ranges should be changed.

Original signature is '- (BOOL)textView:(NSTextView *)textView shouldChangeTextInRanges:(NSArray *)affectedRanges replacementStrings:(NSArray *)replacementStrings'

Available in Mac OS X v10.4 and later.

Declaration Syntax
C#Visual BasicVisual C++
bool TextViewShouldChangeTextInRangesReplacementStrings(
	NSTextView textView,
	NSArray affectedRanges,
	NSArray replacementStrings
Function TextViewShouldChangeTextInRangesReplacementStrings ( _
	textView As NSTextView, _
	affectedRanges As NSArray, _
	replacementStrings As NSArray _
) As Boolean
bool TextViewShouldChangeTextInRangesReplacementStrings(
	NSTextView^ textView, 
	NSArray^ affectedRanges, 
	NSArray^ replacementStrings
textView (NSTextView)
The text view sending the message. This is the first text view in a series shared by a layout manager, not necessarily the text view displaying the selected text.
affectedRanges (NSArray)
The array of ranges of characters to be replaced. This array must be a non-nil, non-empty array of objects responding to the NSValue rangeValue method, and in addition its elements must be sorted, non-overlapping, non-contiguous, and (except for the case of a single range) have non-zero-length.
replacementStrings (NSArray)
The array of strings that will replace the characters in affectedRanges, one string for each range; nil if only text attributes are being changed.
Return Value
YES to allow the replacement, or NO to reject the change.
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)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)