         @horizontalScrollbar.scrollLeft = x
         @verticalScrollbar.scrollTop = y
         @onScroll x,y
+
 
 class TableView
 

            # TODO support other browsers
            if evt.type is "mousewheel"
                @setScrollXY @scrollLeft - evt.wheelDeltaX, @scrollTop - evt.wheelDeltaY

        if @container.addEventListener
            @container.addEventListener "mousewheel", onMouseWheel, false
            @container.addEventListener "DOMMouseScroll", onMouseWheel, false
        else @container.attachEvent "onmousewheel", onMouseWheel
    
    onScroll: (x,y)->

    setScrollXY: (x,y)->

        j = bound binary_search(@columnOffset, x), 0, (@nbCols - @nbColsVisible)
        [i, j]

    cleanUp: ->
        # be nice rewind !
        @eventRegister.unbindAll()
        @ScrollBarProxy?.onScroll = null
        @painter.cleanUp this

    setup: ->
        @cleanUp()
        
        # can be called when resizing the window
        @columns = {}
        @cells = {}
