PDA

View Full Version : createDelegate(this) vs createCallback(this)



huhulucy90
22 Sep 2009, 4:30 PM
which one is better to use?



aFunction.createDelegate(this)
var aFunction = function() {
this.getView().refresh()
}



or


aFunction.createCallback(this)
var aFunction = function(aGrid) {
aGrid.getView().refresh()
}

karieanis
22 Sep 2009, 6:38 PM
Which one you use depends on what it is you want to do. I would suggest reading the docs regarding createCallback and createDelegate.