Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

NSTextViewMBS.shouldChangeTextInRange(affectedCharRange as NSRangeMBS, replacementString as string = "") as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 18.1 Yes No No Yes, macOS only No
Function: Initiates a series of delegate messages (and general notifications) to determine whether modifications can be made to the characters and attributes of the receiver’s text.
Notes:
affectedCharRange: The range of characters affected by the proposed change.
replacementString: The characters that will replace those in affectedCharRange. If only text attributes are being changed, replacementString is "".

Returns true to allow the change, false to prohibit it.

This method checks with the delegate as needed using textShouldBeginEditing and shouldChangeTextInRange.
This method must be invoked at the start of any sequence of user-initiated editing changes. If your subclass of NSTextView implements methods that modify the text, make sure to invoke this method to determine whether the change should be made. If the change is allowed, complete the change by invoking the didChangeText method.

If the receiver is not editable, this method automatically returns false. This result prevents instances in which a text view could be changed by user actions even though it had been set to be non-editable.
In macOS 10.4 and later, if there are multiple selections, this method acts on the first selected subrange.

See also:

Feedback, Comments & Corrections

NSTextViewMBS.showFindIndicatorForRange(charRange as NSRangeMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: Causes a temporary highlighting effect to appear around the visible portion (or portions) of the specified range.
Notes:
charRange: The character range around which indicators appear.

This method supports lozenge-style indication of find results. The indicators automatically disappear after a certain period of time, or when the method is called again, or when any of a number of changes occur to the view (such as changes to text, view size, or view position).

This method does not itself scroll the specified range to be visible; any desired scrolling should be done before this method is called, first, because the method acts only on the visible portion of the specified range, and, second, because scrolling causes the indicators to disappear. Calling this method with a zero-length range always removes any existing indicators.

Available in OS X v10.5 and later.

Feedback, Comments & Corrections

NSTextViewMBS.startSpeaking
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Speaks the selected text, or all text if no selection.

Feedback, Comments & Corrections

NSTextViewMBS.stopSpeaking
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Stops the speaking of text.

Feedback, Comments & Corrections

NSTextViewMBS.tightenKerning
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Decreases the space between glyphs in the receiver's selection, or for all glyphs if the receiver is a plain text view.
Notes: Kerning values are determined by the point size of the fonts in the selection.

Feedback, Comments & Corrections

NSTextViewMBS.toggleAutomaticDashSubstitution
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 11.3 Yes No No Yes, macOS only No
Function: Toggles automatic dash substitution.
Notes: Available on Mac OS X 10.6 or newer.

Feedback, Comments & Corrections

NSTextViewMBS.toggleAutomaticDataDetection
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 11.3 Yes No No Yes, macOS only No
Function: Toggles automatic data detection.
Notes: Available on Mac OS X 10.6 or newer.

Feedback, Comments & Corrections

NSTextViewMBS.toggleAutomaticLinkDetection
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Changes the state of automatic link detection from enabled to disabled and vice versa.
Notes:
Automatic link detection causes strings representing URLs typed in the view to be automatically made into links to those URLs.

Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

NSTextViewMBS.toggleAutomaticQuoteSubstitution
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Changes the state of automatic quotation mark substitution from enabled to disabled and vice versa.
Notes:
Automatic quote substitution causes ASCII quotation marks and apostrophes to be automatically replaced, on a context-dependent basis, with more typographically accurate symbols.

Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

NSTextViewMBS.toggleAutomaticSpellingCorrection
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 11.3 Yes No No Yes, macOS only No
Function: Toggles automatic spelling correction.
Notes: Available on Mac OS X 10.6 or newer.

Feedback, Comments & Corrections

NSTextViewMBS.toggleAutomaticTextReplacement
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 11.3 Yes No No Yes, macOS only No
Function: Toggles automatic text replacements.
Notes: Available on Mac OS X 10.6 or newer.

Feedback, Comments & Corrections

NSTextViewMBS.toggleBold
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 16.5 Yes No No Yes, macOS only No
Function: Toggles the use of a bold/non-bold font.
Example:
//  some textview
dim textview as NSTextView = TextArea1.NSTextViewMBS

// switch between bold and non bold
textview.toggleBold
Notes:
You can set this to continue typing with/without bold or change current selection.
Can only provide bold if the font supports it.

Feedback, Comments & Corrections

NSTextViewMBS.toggleContinuousSpellChecking
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Toggles whether continuous spell checking is enabled for the receiver.

Feedback, Comments & Corrections

NSTextViewMBS.toggleGrammarChecking
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: Changes the state of grammar checking from enabled to disabled and vice versa.
Notes: Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

NSTextViewMBS.toggleItalic
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 16.5 Yes No No Yes, macOS only No
Function: Toggles the use of an italic/non-italic font.
Example:
//  some textview
dim textview as NSTextView = TextArea1.NSTextViewMBS

// switch between italic and non italic
textview.toggleItalic
Notes:
You can set this to continue typing with/without bold or change current selection.
Can only provide italic if the font supports it.

Feedback, Comments & Corrections

NSTextViewMBS.toggleSmartInsertDelete
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Changes the state of smart insert and delete from enabled to disabled and vice versa.
Notes:
Controls whether the receiver inserts or deletes space around selected words so as to preserve proper spacing and punctuation.

Available in Mac OS X v10.5 and later.

Feedback, Comments & Corrections

NSTextViewMBS.toggleTraditionalCharacterShape
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Toggles the NSCharacterShapeAttributeName attribute at the current selection.

Feedback, Comments & Corrections

NSTextViewMBS.turnOffKerning
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Sets the receiver to use nominal glyph spacing for the glyphs in its selection, or for all glyphs if the receiver is a plain text view.

Feedback, Comments & Corrections

NSTextViewMBS.turnOffLigatures
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Sets the receiver to use only required ligatures when setting text, for the glyphs in the selection if the receiver is a rich text view, or for all glyphs if it's a plain text view.

Feedback, Comments & Corrections

NSTextViewMBS.updateDragTypeRegistration
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 9.6 Yes No No Yes, macOS only No
Function: Updates the acceptable drag types of all text views associated with the receiver's layout manager.
Notes:
If the receiver is editable and is a rich text view, causes all text views associated with the receiver's layout manager to register their acceptable drag types. If the text view isn't editable or isn't rich text, causes those text views to unregister their dragged types.

Subclasses can override this method to change the conditions for registering and unregistering drag types, whether as a group or individually based on the current state of the text view. They should invoke this method when that state changes to perform the necessary update.

Feedback, Comments & Corrections

NSTextViewMBS.updateFontPanel
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 9.6 Yes No No Yes, macOS only No
Function: Updates the Font panel to contain the font attributes of the selection.
Notes: Does nothing if the receiver doesn't use the Font panel. You should never need to invoke this method directly, but you can override it if needed to handle additional font attributes.

Feedback, Comments & Corrections

NSTextViewMBS.updateRuler
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 9.6 Yes No No Yes, macOS only No
Function: Updates the ruler view in the receiver's enclosing scroll view to reflect the selection's paragraph and marker attributes.
Notes: Does nothing if the ruler isn't visible or if the receiver doesn't use the ruler. You should never need to invoke this method directly, but you can override this method if needed to handle additional ruler attributes.

Feedback, Comments & Corrections

NSTextViewMBS.useAllLigatures
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Sets the receiver to use all ligatures available for the fonts and languages used when setting text, for the glyphs in the selection if the receiver is a rich text view, or for all glyphs if it's a plain text view.

Feedback, Comments & Corrections

NSTextViewMBS.useStandardKerning
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Set the receiver to use pair kerning data for the glyphs in its selection, or for all glyphs if the receiver is a plain text view.

Feedback, Comments & Corrections

NSTextViewMBS.useStandardLigatures
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 8.6 Yes No No Yes, macOS only No
Function: Sets the receiver to use the standard ligatures available for the fonts and languages used when setting text, for the glyphs in the selection if the receiver is a rich text view, or for all glyphs if it's a plain text view.

Feedback, Comments & Corrections

Previous items

The items on this page are in the following plugins: MBS MacCocoa Plugin.




Links
MBS FileMaker tutorial videos