title: Coffeescript class object in array
body: <p>I have some class with some functions and properties</p>
  
  <pre><code>exports.textareaWidget = class textareaWidget extends Widget
  name = null    
  getHtml: -&gt;
          this.generateHtml(widgetHtml)
  </code></pre>
  
  <p>Then I create an object and add to array:</p>
  
  <pre><code>    obj = new w.textareaWidget()
      obj.name = "msgBody"
      console.log obj.getHtml() # works
      arr.push(obj)
  # getting from arr
  for field in arr
    result = result + field.getHtml()
  </code></pre>
  
  <p>When I want to get it from array I can access properites (name) but I can't access functions (getHtml). Why and how can I make it working ?
  The error:</p>
  
  <pre><code>TypeError: Object #&lt;Object&gt; has no method 'getHtml'
  </code></pre>