@@ -17,7 +17,7 @@ extension BusUI { | |||||
self.textApp = textApp | self.textApp = textApp | ||||
self.textUI = textUI | self.textUI = textUI | ||||
/**/print("ИГР BusUTF(\(Unmanaged.passUnretained(self).toOpaque())).init textA/textU: '\(textApp)'/'\(textUI)'") | |||||
/**///print("ИГР BusUTF(\(Unmanaged.passUnretained(self).toOpaque())).init textA/textU: '\(textApp)'/'\(textUI)'") | |||||
$id | $id | ||||
.sink { [weak self] v in self?.setup(v) } | .sink { [weak self] v in self?.setup(v) } | ||||
@@ -4,14 +4,14 @@ import SwiftUI | |||||
extension MeetupId { | extension MeetupId { | ||||
public struct TV: View { | public struct TV: View { | ||||
let id: String | let id: String | ||||
@StateObject var vm = TVM() | |||||
@StateObject var vm = VM() | |||||
public init(_ id: String) { | public init(_ id: String) { | ||||
self.id = id | self.id = id | ||||
} | } | ||||
public var body: some View { | public var body: some View { | ||||
TextField("TV", value: vm.$textField.v, formatter: BusUI.TextFieldSource()) | |||||
TextField("TV", value: $vm.textField.v, formatter: BusUI.TextFieldSource()) | |||||
.padding(8) | .padding(8) | ||||
.border(Color.blue) | .border(Color.blue) | ||||
.animation(.easeInOut(duration: 0.3)) | .animation(.easeInOut(duration: 0.3)) | ||||
@@ -1,14 +1,15 @@ | |||||
import BusX | import BusX | ||||
import Combine | |||||
extension MeetupId { | extension MeetupId { | ||||
public final class VM: ObservableObject { | public final class VM: ObservableObject { | ||||
let textField = BusUI.TextField(K.testTextApp, K.testTextUI) | |||||
@Published public var id: String? | @Published public var id: String? | ||||
@Published var textField = BusUI.TextField(K.testTextApp, K.testTextUI) | |||||
var subscriptions = [AnyCancellable]() | var subscriptions = [AnyCancellable]() | ||||
public init() { } | public init() { } | ||||
public setup(_ id: String) { | |||||
public func setup(_ id: String) { | |||||
/**/print("ИГР MeetupIV(\(Unmanaged.passUnretained(self).toOpaque())).setup id: '\(id)'") | /**/print("ИГР MeetupIV(\(Unmanaged.passUnretained(self).toOpaque())).setup id: '\(id)'") | ||||
textField.id = id | textField.id = id | ||||
} | } | ||||