karga
12 Jul 2009, 4:26 AM
Hi,
I'm often in need of an event handler, that only fires once and then kills itself.. I'm using something like this
function fnLoad() {
//Load functionality
objTreeLoader.removeListener('load',fnLoad)
}
objTreeLoader.addListener('load',fnLoad)
Is it possible to to this in any other (simpler) way? Otherwise I would like to make this a request :)
I'm often in need of an event handler, that only fires once and then kills itself.. I'm using something like this
function fnLoad() {
//Load functionality
objTreeLoader.removeListener('load',fnLoad)
}
objTreeLoader.addListener('load',fnLoad)
Is it possible to to this in any other (simpler) way? Otherwise I would like to make this a request :)