title: How to display data using TornadoFX treeview
body: <p>I am learning how to use kotlin and have started using tornadoFX. I am going through the guide in an attempt to learn it, however I cannot figure out what is meant in the 'TreeView with Differing Types'. It seems to say that I should use star projection, which as I know it when you use a * in the call.</p>
  
  <p>However as soon as I do that, the treeview says that 'Projections are not allowed on type arguments of functions and properties' </p>
  
  <p>This is my code:</p>
  
  <p>class MainView : View("") {</p>
  
  <pre><code>override val root = treeview&lt;*&gt; {
          root = TreeItem(Person("Departments", ""))
  
          cellFormat {
              text = when (it) {
                  is String -&gt; it
                  is Department -&gt; it.name
                  is Person -&gt; it.name
                  else -&gt; throw IllegalArgumentException("Invalid Data Type")
              }
          }
  
          populate { parent -&gt;
              val value = parent.value
              if (parent == root) departments
              else if (value is Department) persons.filter { it.department == value.name }
              else null
          } }
  
  }
  </code></pre>
  
  <p>I'm honestly stumped, I don't know what I am meant to be doing.</p>
  
  <p>Also if anyone else could provide me with some useful links for learning both Kotlin and tornadoFX it would be much appreciated :)</p>