title: Calling object methods internally in dojo
body: <p>I am trying to create a dojo class which contains functions which in turn call other functions within this class, as follows:</p>
  
  <pre><code>dojo.provide("my.drawing");
  dojo.declare("my.drawing", null, {
      constructor: function(/* Object */args){
          dojo.safeMixin(this, args);
          this.container = args[0];    
      },
  
      addPoint: function(event){
              //calculate the x and y values by offsetting correctly
              var pos = dojo.coords(container);
              var x = event.clientX - pos.x;
              var y = event.clientY - pos.y;
              this.addAbsPoint(x,y);
        },
  
      addAbsPoint: function(x,y){
          //do something here with the absolute x and y values
      }
  });
  </code></pre>
  
  <p>The above (trimmed) code is to add a point onto a dojo.gfx surface. When I try and run it I get the following console error:</p>
  
  <pre><code>Uncaught TypeError: Object #&lt;an HTMLDivElement&gt; has no method 'addAbsPoint'
  </code></pre>
  
  <p>The function addPoint(event) is being called correctly, but it fails when it trys to reference the function addAbsPoint(x,y) in the same object. Is this possible in dojo? How can I accomplish it?</p>