title: Why is my Meteor template context data not being saved?
body: <p>I'm scratching my head at this because I remember this exact code working at some point in the past. When <code>test</code> is created and rendered I set the value of <code>this.data</code> but I can't retrieve it in events or helpers. I'm beginning to think that a package or something screwed up my Meteor.</p>
  
  <pre><code>&lt;template name="test"&gt;
    &lt;button&gt;click me&lt;/button&gt;    
  &lt;/template&gt;
  </code></pre>
  
  <pre><code>Template.test.onCreated(function(){
    // here I am setting the data context of the test template
    this.data = {
      doors: 5
    };
  
    // when I hover over `this` in Chrome is indeed shows the object
    debugger
  });
  
  Template.test.onRendered(function(){
  
    this.data = {
      wheels: 4
    };
    // when I hover over `this` it also shows the object
    debugger
  
    var changeDataContext = function(obj){
      this.data = obj;
    };
  
    changeDataContext( {engine: 1} );
  
    // when I hover over `this` it shows the old value of `this`, not the new one with {engine: 1}
    this;
    debugger
  });
  
  
  Template.test.events({
  
    'click button': function(e, tmpl){
      tmpl;
  
      // when I hover over `tmpl` it shows null for `data`???
      debugger
    }
  
  });
  
  Template.test.helpers({
  
    images: function () {
      this;
  
      // when I hover over `this` it shows null for the value of `this`???
      debugger
      return this.wheels;
    }
  
  });
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is a MeteorPad outlining the problem:</p>
  
  <p><a href="http://meteorpad.com/pad/Cqw3fWieJfspK2eYv/Leaderboard" rel="nofollow">http://meteorpad.com/pad/Cqw3fWieJfspK2eYv/Leaderboard</a></p>
  
  <p>Check out the debugger statements here:</p>
  
  <p><a href="http://app-5p5urzku.meteorpad.com/" rel="nofollow">http://app-5p5urzku.meteorpad.com/</a></p>