From a2b34652f8a94731aa6e5a7a1695e4c090d9733b Mon Sep 17 00:00:00 2001 From: Tony Arnold Date: Wed, 13 Sep 2017 16:48:09 +1000 Subject: [PATCH] =?UTF-8?q?Call=20controlTextDidChange(=E2=80=A6)=20as=20a?= =?UTF-8?q?n=20optional=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes an exception when the forwarded delegate does not implement this method. --- RxCocoa/macOS/NSTextField+Rx.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RxCocoa/macOS/NSTextField+Rx.swift b/RxCocoa/macOS/NSTextField+Rx.swift index df46a50c4..66014c53f 100644 --- a/RxCocoa/macOS/NSTextField+Rx.swift +++ b/RxCocoa/macOS/NSTextField+Rx.swift @@ -40,7 +40,7 @@ public class RxTextFieldDelegateProxy let textField: NSTextField = castOrFatalError(notification.object) let nextValue = textField.stringValue self.textSubject.on(.next(nextValue)) - _forwardToDelegate?.controlTextDidChange(notification) + _forwardToDelegate?.controlTextDidChange?(notification) } // MARK: Delegate proxy methods