Below is an error I am getting from binding "this" to a click event in javascript. The format of the js is Jaml/Mooml and may be unfamiliar to some but I assure you the syntax is proper. I have been binding "this" to many events in the same way and this is the first time I have seen this error so I am hoping some mootools, jaml or javascript expert will be able to derive a solution from the error and code below.
Uncaught TypeError: Object [object Object] has no method 'get'
Mooml.engine.tags.div.Mooml.engine.tags.div.events.click:relay(a)
bubbleUpmootools-core-1.4.1.js:3948
delegation.addEvent.delegatormootools-core-1.4.1.js:4078
defn
here is the Jaml...
'main': new Mooml.Template(null, function(data) {
div({'class': 'lists container'},
div({
'class': 'sources',
'events': {
'click:relay(a)': function(event) {
event.preventDefault();
new Resource({
'url': this.get('href'),
'method': 'FRIENDS',
'query' : {
'source': this.dataset.source
},
'onSuccess': function(response) {
console.log(response);
//this.renderTemplate('friends', response.mv, this);
}.bind(this),
'onFailure': this.onFailure
}).send();
}.bind(this)
}