senchalabs/jsduck — Issue #90: "How to use classes in Sencha Touch 2" examples do not work
Author: hipertracker
Created: 2011-11-07 22:29:22+00:00
State: open

From http://docs.sencha.com/touch/2-0/#!/guide/data

```javascript
Ext.define('Animal', {
config: {
name: null
},

speak: function() {
alert('grunt');
}
});

Ext.define('Human', {
extend: 'Animal',

speak: function() {
alert(this.getName());
}
});

var bob = Ext.create('Human', {
name: 'Bob'
});

bob.speak(); // It should alert 'Bob', but it alerts null !
```

Dependencies and Dynamic Loading example also do not work.

```javascript
Ext.define('Animal', {
config: {
name: null
},

speak: function() {
alert('grunt');
}
});

Ext.define('Human', {
extend: 'Animal',

requires: 'Ext.MessageBox',

speak: function() {
Ext.Msg.alert()
}
});

var bob = Ext.create('Human', {name: 'Bob'});
bob.speak(); // Uncaught TypeError: Cannot call method 'add' of undefined
```