.../Source/App/SearchAndPreview/ClipItems/ClipItemTableRowTextView.swift
Line | Count | Source |
1 | | // |
2 | | // ClipItemTableRowTextView.swift |
3 | | // CutBox |
4 | | // |
5 | | // Created by Jason Milkins on 7/5/18. |
6 | | // Copyright © 2018-2023 ocodo. All rights reserved. |
7 | | // |
8 | | |
9 | | import Cocoa |
10 | | |
11 | | class ClipItemTableRowTextView: ItemTableRowTextView { |
12 | | |
13 | 76 | override func setup() { |
14 | 76 | guard let data = self.data else { |
15 | 1 | fatalError("Data must be initialized on ClipItemTableRowView before setup.") |
16 | 76 | } |
17 | 76 | |
18 | 76 | guard let titleString = data["string"] as? String else { |
19 | 1 | fatalError("Data must contain key: string") |
20 | 76 | } |
21 | 76 | |
22 | 76 | self.title.stringValue = titleString |
23 | 76 | .trimmingCharacters(in: .whitespacesAndNewlines) |
24 | 76 | .truncate(limit: 1000) |
25 | 76 | } |
26 | | } |