From 3f062e1c0a13e43ee2b33ad9868cba19eb5dc3fd Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Mon, 8 Jan 2018 13:15:31 +0100 Subject: [PATCH] Fixed: Make all method in CPTextDelegate and CPTextViewDelegate protocol optional. --- AppKit/CPText.j | 1 + AppKit/CPTextView/CPTextView.j | 1 + 2 files changed, 2 insertions(+) diff --git a/AppKit/CPText.j b/AppKit/CPText.j index 7f2034bcc..490053047 100644 --- a/AppKit/CPText.j +++ b/AppKit/CPText.j @@ -40,6 +40,7 @@ @protocol CPTextDelegate +@optional - (BOOL)textShouldBeginEditing:(CPText)aTextObject; - (BOOL)textShouldEndEditing:(CPText)aTextObject; - (void)textDidBeginEditing:(CPNotification)aNotification; diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 5953a31f8..67e6b8762 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -43,6 +43,7 @@ @protocol CPTextViewDelegate +@optional - (BOOL)textView:(CPTextView)aTextView doCommandBySelector:(SEL)aSelector; - (BOOL)textView:(CPTextView)aTextView shouldChangeTextInRange:(CPRange)affectedCharRange replacementString:(CPString)replacementString; - (CPDictionary)textView:(CPTextView)textView shouldChangeTypingAttributes:(CPDictionary)oldTypingAttributes toAttributes:(CPDictionary)newTypingAttributes;