Chapter 4: Text("\(self.Target)")

In Chapter 4, the line: Text(“(self.Target)”) has an error. The error is "Type of expression is ambiguous without more context. I have not been able to find a solution.

@jsbotts73 The correct version of the above line of code is Text(“\(self.target)”). You use string interpolation to display the target value on the screen.

Sorry… In stating my question I did not write the correct code. The code that creates the error is in fact:
Text(“(self.target)”)
I don’t know how to add further context. Interesting that in the Slider Row, the same code is written and does not have the above mentioned error.
Thanks again

@jsbotts73 Do you still have issues with this?

Hi @jsbotts73, I downloaded the final source code for the app and see Text(“(target)”)…, maybe try removing self?

This topic was automatically closed after 166 days. New replies are no longer allowed.