.../Source/Components/TextFieldKeyUpRxStream.swift
Line | Count | Source (jump to first uncovered line) |
1 | | // |
2 | | // TextFieldKeyUpRxStream.swift |
3 | | // CutBox |
4 | | // |
5 | | // Created by Jason Milkins on 21/8/23. |
6 | | // Copyright © 2023 ocodo. All rights reserved. |
7 | | // |
8 | | |
9 | | import RxSwift |
10 | | |
11 | | /// Provide keyUp event stream on a NSTextField |
12 | | class TextFieldKeyUpRxStream: CutBoxBaseTextField { |
13 | 50 | let keyUp = PublishSubject<NSEvent>() |
14 | | |
15 | 0 | override func keyUp(with event: NSEvent) { |
16 | 0 | super.keyUp(with: event) |
17 | 0 | keyUp.onNext(event) |
18 | 0 | } |
19 | | |
20 | 2 | override init(frame frameRect: NSRect) { |
21 | 2 | super.init(frame: frameRect) |
22 | 2 | } |
23 | | |
24 | 48 | required init?(coder: NSCoder) { |
25 | 48 | super.init(coder: coder) |
26 | 48 | } |
27 | | } |