title: trying to derive from a dijit Button: "TypeError: this._attachEvents is undefined"
body: <p>I am trying to derive an "extended" Button from dijit/Form/Button. (I want to pass extra arguments to the constructor, and I want to encapsulate these preparations in my derived class. Button is just an example, I want to use this later with grids and trees.)</p>
  
  <p>Unfortunately the code below fails with "TypeError: this._attachEvents is undefined" in the firefox javascript console. Some idea, what is wrong? The same code, including minimal HTML, is ready to run at <a href="http://jsfiddle.net/x9dLs8gz/1/" rel="nofollow">http://jsfiddle.net/x9dLs8gz/1/</a></p>
  
  <pre><code>require(["dojo/_base/declare", "dijit/form/Button", "dojo/dom", "dojo/json", "dojo/domReady!"],
  
  function (declare, Button, dom, json) {
      declare("MyButton", Button, {
          "-chains-": {
              constructor: "manual"
          },
          constructor: function () {
              //extra calculation will go here...
              this.inherited(arguments);
          }
      });
      new MyButton({
          label: "Click Me!",
          onClick: function () {
              dom.byId("result").innerHTML += "Success";
          }
      }, "button").startup();
  });
  </code></pre>
  
  <p>Cheers,
  Dominic</p>