title: String Interpolation Not Updating in SwiftUI Environment Variable When Changed by Picker
body: <p>I've got a list of message examples that use string interpolation to make the example more relevant to the user. Because I've found that you cannot use variables before you initiate the class, it is created as an empty <code>[String]</code>, and then assigned a value after the <code>init()</code>. However, the variables used in the strings are then changed using a picker. Additionally, the class is used as an <code>@EnvironmentVariable</code>, and so everything is sent to a publisher when changed, which is where I think the problem lies – I think there is some problem with the interpolation that doesn't let it subscribe to the publisher changes.</p>
  
  <p>The class is defined as such:</p>
  
  <pre class="lang-swift prettyprint-override"><code>class GlobalVars: ObservableObject {
  
      let objectWillChange = PassthroughSubject&lt;GlobalVars,Never&gt;()
  
      var listToChooseFrom: [String] = [
          "a list",
          "of options",
          "to be chosen from"
      ] {
          didSet {
              objectWillChange.send(self)
          }
      }
      var listPos: Int = 0 {
          didSet {
              objectWillChange.send(self)
          }
      }
      var stringToChange: String {
          didSet {
              objectWillChange.send(self)
          }
      }
      var output: [String] {
          didSet {
              objectWillChange.send(self)
          }
      }
  
      init() {
          switch listPos {
          case 0:
              stringToChange = "a value"
          case 1:
              stringToChange = "another value"
          default:
              stringToChange = "toodleydoo"
          }
          output = [
              "a list",
              "with several variables",
              "defined above",
              "and one modified within the init() statement",
              "referenced within strings",
              "like \(stringToChange)."
          ]
      }
  }
  </code></pre>
  
  <p>The picker is defined as such, and changes the value of <code>listPos</code> relative to <code>listToChooseFrom</code>:</p>
  
  <pre class="lang-swift prettyprint-override"><code>Picker("Select an option", selection: $globalVars.listPos) {
      ForEach(0 ..&lt; globalVars.listToChooseFrom) {
          Text("\(self.globalVars.listToChooseFrom[$0])")
      }
  }
  </code></pre>
  
  <p>I want the code in the <code>init()</code> statement to run every time <code>globalVars.listPos</code> is changed by the picker. Thanks for the help :)</p>