@ObservedObject change causes SwiftUI error

After changing my Combine code to the new @ObservedObject and ObservableObject changes in Xcode Beta 5, I am now getting "Type of expression is ambiguous without more context" on the following code:


            
Var body: some View {
          ScrollView{ 
              VStack{
                HStack{
                    Image(systemName: "clock.fill")
                    Text("Text") <====TYPE OF EXPRESSION IS AMBIGUOUS WITHOUT MORE CONTEXT
                    Image(systemName: "dollarsign.circle.fill")
                }
               }
              }
}

Any suggestions???

Accepted Reply

AFter a bit of more research I can say that the real issue is due to further in the code.. I have a the following:


Text(String(format: "$ %5.2f", self.classname.someFloatvariable))
// Cannot convert value of type 'Text' to closure result type '_'

It seems that the Combine changes, are casusing issues with the String conversation.. to the best of my understanding.


The code has been changed to address @ObservableObject, @Published, and @ObservedObject.


Anyone else seeing this??

Replies

AFter a bit of more research I can say that the real issue is due to further in the code.. I have a the following:


Text(String(format: "$ %5.2f", self.classname.someFloatvariable))
// Cannot convert value of type 'Text' to closure result type '_'

It seems that the Combine changes, are casusing issues with the String conversation.. to the best of my understanding.


The code has been changed to address @ObservableObject, @Published, and @ObservedObject.


Anyone else seeing this??