New selection specification a big change? (plus WIP of slider example)

Hi all,

I was just working up a demo of the new callbacks. Still very much a WIP, but you can see it here: http://nbviewer.ipython.org/github/birdsarah/bokeh-miscellany/blob/master/notebooks/slider_example/Gapminder%20homage%200_2%20html%20widget.ipynb (it takes a little while to load)

In doing this I discovered that where you used to be able to use:
source.selected = [0]

you now have to use:
source.selected = {
‘0d’: {‘flag’: False, ‘indices’: },
‘1d’: {‘indices’: [0]},
‘2d’: {‘indices’: }
}

This seems like a faily big non-backward compatible change (but the docstring was helpful and got me back on the right path quickly).

Best,

Bird

Hi Sarah,

···

On Fri, May 15, 2015 at 7:30 AM, Sarah Bird [email protected] wrote:

Hi all,

I was just working up a demo of the new callbacks. Still very much a WIP, but you can see it here: http://nbviewer.ipython.org/github/birdsarah/bokeh-miscellany/blob/master/notebooks/slider_example/Gapminder%20homage%200_2%20html%20widget.ipynb (it takes a little while to load)

Awesome!

In doing this I discovered that where you used to be able to use:
source.selected = [0]

you now have to use:
source.selected = {
‘0d’: {‘flag’: False, ‘indices’: },
‘1d’: {‘indices’: [0]},
‘2d’: {‘indices’: }
}

This seems like a faily big non-backward compatible change (but the docstring was helpful and got me back on the right path quickly).

Grrr… you are right. This is indeed a fairly big non-backward compatible change that involves all API levels (specially those that are at a fairly stable status, like glyph and plotting) and highlighted warning about this change on the docs.

Thanks!!

Fabio Pliger