title: Using object constructor of a trait
body: <p>This is my class I am trying to create the following constructor for:</p>
  
  <pre><code>class StatsView(name: String, manager: AssetManager, statistics: Statistics) extends Node(name) with Control {
  ....
  </code></pre>
  
  <p>This is the object for which I am trying to use the constructor of Node</p>
  
  <pre><code>object Node {
    def apply(name: String) = new Spatial(name) with Node
    def apply() = new Spatial with Node
  }
  
  trait Node extends Spatial {
  </code></pre>
  
  <p>My issue is that Node is a trait causing this error message from the compiler:</p>
  
  <pre><code>trait Node is a trait; does not take constructor arguments
  </code></pre>
  
  <blockquote>
    <p>trait Node is a trait; does not take constructor arguments</p>
    
    <p>class StatsView(name: String, manager: AssetManager, statistics: Statistics) extends Node(name) with Control {</p>
  </blockquote>
  
  <p>Hope you can help me.</p>