tntvis / tnt

Visualization of trees and track based annotations
Apache License 2.0
6 stars 2 forks source link

success callbacks on track.updater.ensembl are backed up by an array #7

Open emepyc opened 10 years ago

emepyc commented 10 years ago

There may be a problem with track.retrievers. Their API allow to set a callback that is called on the response of the updater. The problem comes when track types and themes want to use this callback. Specifically: track.retriever.ensembl's success callback is set by genome.track.gene.updater but also by the legend theme. For this reason I have made the success methdo in track.retriever.ensembl backed up by an array, so all the success callbacks can be called on update. The problem is that we can't support a way of removing callbacks, which may be fine for most cases, but it may be improved with a more consistent solution.

emepyc commented 10 years ago

Also, this creates an asymmetry between track.retriever.ensembl and track.retriever.local (because in track.retriever.local, the success method substitutes the previous defined callback)