TDKCandidates // Print character descriptions to console, etc. (#250)
* TDKCandidates // Remove certain useless default values. * TDKCandidates // Print character descriptions to console.
This commit is contained in:
parent
3c88b810bc
commit
7aaa950d45
|
@ -132,6 +132,14 @@ public class CandidateCellData: Hashable {
|
||||||
let attrStrCandidate = NSMutableAttributedString(string: displayedText, attributes: attrCandidate)
|
let attrStrCandidate = NSMutableAttributedString(string: displayedText, attributes: attrCandidate)
|
||||||
return attrStrCandidate
|
return attrStrCandidate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public var charDescriptions: String {
|
||||||
|
var result = displayedText
|
||||||
|
if displayedText.contains("("), displayedText.count > 2 {
|
||||||
|
result = displayedText.replacingOccurrences(of: "(", with: "").replacingOccurrences(of: ")", with: "")
|
||||||
|
}
|
||||||
|
return result.charDescriptions.joined(separator: "\n")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Contents specifically made for macOS 12 and newer.
|
// MARK: - Contents specifically made for macOS 12 and newer.
|
||||||
|
|
|
@ -188,6 +188,7 @@ public class CandidatePool {
|
||||||
case .vertical: highlightVertical(at: indexSpecified)
|
case .vertical: highlightVertical(at: indexSpecified)
|
||||||
@unknown default: break
|
@unknown default: break
|
||||||
}
|
}
|
||||||
|
vCLog("\n" + candidateDataAll[highlightedIndex].charDescriptions)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public struct VwrCandidateHorizontal: View {
|
||||||
@Environment(\.colorScheme) var colorScheme
|
@Environment(\.colorScheme) var colorScheme
|
||||||
@State public var thePool: CandidatePool
|
@State public var thePool: CandidatePool
|
||||||
@State public var tooltip: String = ""
|
@State public var tooltip: String = ""
|
||||||
@State public var reverseLookupResult: [String] = ["MLGB"]
|
@State public var reverseLookupResult: [String] = []
|
||||||
|
|
||||||
private var positionLabel: String {
|
private var positionLabel: String {
|
||||||
(thePool.highlightedIndex + 1).description + "/" + thePool.candidateDataAll.count.description
|
(thePool.highlightedIndex + 1).description + "/" + thePool.candidateDataAll.count.description
|
||||||
|
|
|
@ -38,7 +38,7 @@ public struct VwrCandidateVertical: View {
|
||||||
@Environment(\.colorScheme) var colorScheme
|
@Environment(\.colorScheme) var colorScheme
|
||||||
@State public var thePool: CandidatePool
|
@State public var thePool: CandidatePool
|
||||||
@State public var tooltip: String = ""
|
@State public var tooltip: String = ""
|
||||||
@State public var reverseLookupResult: [String] = ["MLGB"]
|
@State public var reverseLookupResult: [String] = []
|
||||||
|
|
||||||
private var positionLabel: String {
|
private var positionLabel: String {
|
||||||
(thePool.highlightedIndex + 1).description + "/" + thePool.candidateDataAll.count.description
|
(thePool.highlightedIndex + 1).description + "/" + thePool.candidateDataAll.count.description
|
||||||
|
|
|
@ -40,7 +40,7 @@ public struct VwrCandidateHorizontalBackports: View {
|
||||||
@Environment(\.colorScheme) var colorScheme
|
@Environment(\.colorScheme) var colorScheme
|
||||||
@State public var thePool: CandidatePool
|
@State public var thePool: CandidatePool
|
||||||
@State public var tooltip: String = ""
|
@State public var tooltip: String = ""
|
||||||
@State public var reverseLookupResult: [String] = ["MLGB"]
|
@State public var reverseLookupResult: [String] = []
|
||||||
|
|
||||||
private var positionLabel: String {
|
private var positionLabel: String {
|
||||||
(thePool.highlightedIndex + 1).description + "/" + thePool.candidateDataAll.count.description
|
(thePool.highlightedIndex + 1).description + "/" + thePool.candidateDataAll.count.description
|
||||||
|
|
|
@ -39,7 +39,7 @@ public struct VwrCandidateVerticalBackports: View {
|
||||||
@Environment(\.colorScheme) var colorScheme
|
@Environment(\.colorScheme) var colorScheme
|
||||||
@State public var thePool: CandidatePool
|
@State public var thePool: CandidatePool
|
||||||
@State public var tooltip: String = ""
|
@State public var tooltip: String = ""
|
||||||
@State public var reverseLookupResult: [String] = ["MLGB"]
|
@State public var reverseLookupResult: [String] = []
|
||||||
|
|
||||||
private var positionLabel: String {
|
private var positionLabel: String {
|
||||||
(thePool.highlightedIndex + 1).description + "/" + thePool.candidateDataAll.count.description
|
(thePool.highlightedIndex + 1).description + "/" + thePool.candidateDataAll.count.description
|
||||||
|
|
Loading…
Reference in New Issue