title: Uncaught TypeError: Object [object global] has no method
body: <pre><code>    var resultItemView = Marionette.CompositeView.extend({
          render : function(){            
              google.load("visualization", "1", {packages:["table"], callback: function() {       
                       var self = this;       
                       this._drawVisualization(self);
              }});
          },
  
         _drawVisualization : function(self){ 
             var data = new google.visualization.DataTable();
  
              //Here i'm creating data table  ...
  
              var chart = new google.visualization.LineChart(self.$el.find("#graphDiv"));
              chart.draw(data, null, null);               
  
         },
         return resultItemView;
     });
  </code></pre>
  
  <p>At render function google visualization is being loaded and in callback function drawVisualization is being called. Also i'm passing "this" object to this function as a parameter.To do this i used an anonymous function. In drawVisualization function self is equal to this "this" object. But i'm getting this error: "Uncaught TypeError: Object [object global] has no method '_drawVisualization'". What am i doing wrong? How can i correct it? Thanks for help.</p>