Coordinator

class Coordinator : NSObject, SWIFTTextViewDelegate

The coordinator for the ChordProEditor

Protocol Functions

Wrap Platform Functions

  • Function the handle the protocol notification that a text should change

    Declaration

    Swift

    func swiftTextView(replacementString: String) -> Bool

    Parameters

    replacementString

    The optional replacement string

    Return Value

    True or false

  • Function the handle the protocol notification that a text selection has changed

    Declaration

    Swift

    @MainActor
    func swiftTextViewDidChangeSelection(selectedRanges: [NSValue])

    Parameters

    selectedRanges

    The current selected range

  • Update the text binding with the current text from the `NSTextView

    Note

    With a debounce of one second to prevent too many updates

    Declaration

    Swift

    @MainActor
    func updateTextBinding()