title: Passing a parameter into called function using Dojo lang.hitch
body: <p>I am using dojo in ESRI's Web AppBuilder environment (which uses the ESRI Javascript 3.x API). </p>
  
  <p>Anyway, I create a button, and in the button's onClick method, I want to be able to call another function using lang.hitch (to keep function in scope). But the called function takes a parameter, and I can't seem to pass it in. I can only call the function, like this. </p>
  
  <p><code>this.myDialogBtn1 = new Button({
        label: "Create New Location",
        disabled: false,
        onClick: lang.hitch(this, this._createNewLocation)
  }).placeAt(this.createNewLoc)</code></p>
  
  <p>And of course, my _createNewLocation function needs to take a parameter, like this.</p>
  
  <p><code>_createNewLocation(param){...do stuff}</code></p>
  
  <p>I'm not sure how I could pass in that parameter to the onClick method. Just adding the parameter like this doesn't work. It throws a TypeError. Any ideas?</p>
  
  <p><code>lang.hitch(this, this._createNewLocation(param))</code></p>