var SortingTable = new Class({
initialize: function( table, options ) {
this.table=$(table);
this.tbody = this.table.getElement('tbody');
//...do alot of things here...
},
addTextInput : function(index,headid,options){
var trs = this.tbody.getChildren();
var trslen = trs.length;
var i=0;
var cell = null;
for(i=0;i<trslen;i++){
cell = trs[i].getChildren()[index];
cell.addEvent('dblclick', function (event){
alert(this.innerHTML); // i can see this is the cell here.
this.makeCellEditor(this); // how to access the parent object?
});
}
},
makeCellEditor : function(cell){
//make form and stuff here.
}
//...alot of more functions...
});
In my dblclick(event) function i would like to access my function makeCellEditor that i've declared in the "parent" object.