Skip to content

Commit

Permalink
Fix NSTextInputClient conformance issues with NSTextField
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Arnold <[email protected]>
  • Loading branch information
tonyarnold committed Oct 24, 2016
1 parent 3c55a30 commit 5031f5c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions RxCocoa/Common/TextInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import Foundation
import Cocoa

/// Represents text input with reactive extensions.
public struct TextInput<Base: NSTextInput> {
public struct TextInput<Base: NSTextInputClient> {
/// Base text input to extend.
public let base: Base

Expand All @@ -70,17 +70,13 @@ import Foundation
}
}

extension Reactive where Base: NSTextField {
extension Reactive where Base: NSTextField, Base: NSTextInputClient {
/// Reactive text input.
public var textInput: TextInput<NSTextField> {
public var textInput: TextInput<Base> {
return TextInput(base: base, text: self.text)
}
}

extension NSTextField : NSTextInput {

}

#endif


0 comments on commit 5031f5c

Please sign in to comment.