this is a Macos app where the parsclass is setup in a previous view that contains the YardageRowView below. That previous view is responsible for changing the contents of the parsclass. This is working is other views that use a NavigationLink to display the views. When the parsclass is changed, this view is refreshed, but […]
- Tags alignment: .center) } func switchScores(number: Int) { var newparRecs = [parsRec]() for i in 0..<17 { le, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/) } } class parsClass: ObservableObject { @Published var pars = [parsRec, and if I dismiss it and display it again, but the previous value is put in the text field on the holeValueTestView. I cannot comprehend how the value is not being passed into the hol, Codable { var id = UUID() var Hole = 1 var Yardage = 1 } struct CourseMaintenance: View { @EnvironmentObject, everything is fine. if you create a macOS project called YardageSample and replace the ContentView.swift and YardageSampleApp.swift with the, height = 400), height: 200, id: \.self) { indice in // this displays the previous value holeValueTestView(value: String(parsclass.pars[in, Identifiable { case CourseMaintenance var id: String { return self.rawValue } } @State var active, label: { Text("Button 1") }) Button(action: {switchScores(number: 2)}, label: { Text("Button 2") }) Button(action: {switchScores(number: 3)}, label: { Text("Button 3") }) CourseDetail().environmentObject(parsclass) }.frame(width: 400, label: { Text("Done") }) Button(action: {switchScores(number: 1)}, text: $value) Text(value) } } struct ContentView_Previews: PreviewProvider { static var previews: some View { Conten, this is a Macos app where the parsclass is setup in a previous view that contains the YardageRowView below. That previous view is responsible, this view is refreshed, you can see that the display in red changes and the black numbers do not change until you click Done and redisplay the .sheet // // Yardage