# IntervalSlider and updating function specification

IntervalSlider seems to ignore Dynamic's second argument:

x = {0, 1};

Slider @ Dynamic @ x[[1]]         (*works well*)
Slider @ Dynamic[x[[1]], None]    (*works well, locked*)
IntervalSlider @ Dynamic[x, None] (*wrong, should be locked but isn't*)

Dynamic @ x

IntervalSlider should be locked the same way the second Slider is. That is not the case.

Is it a bug, is there a workaround?

I'd say it was a bug. Here's a workaround:

IntervalSlider@Dynamic[x, # &]

The sliders move when dragged but pop back to the original setting when released. I don't like that, but maybe it's supposed to do that.

Update

The bug seems to be in NotebookToolsControlsDumpextractFunction: The case where a single None is passed for the update function(s) is not handled, and the call defaults to the equivalent of

Dynamic[x, {None, Automatic, None}]

Another possible workaround is the following, which is what a simple None should have been mapped to:

Dynamic[x, {None, None, None}]

Yet another fix is to extend the internal function to handle None, but that's not a safe fix, IMO:

NotebookToolsControlsDumpextractFunction[which_, None] := Null &;
• Yes, I agree, already reported. Wanted to post it here for future reference. Also the problem seems to be deeper, in case of foo in place of None it will be ignored unless we transform it too foo[#]& which indicates sloppy implementation. – Kuba Feb 3 at 15:31
• I faced this because my code was not working: IntervalSlider[Dynamic[x, {foo, bar}]]. Based on extractFunction it is clear that foo[#]& is needed but I don't think that is expected. – Kuba Feb 3 at 19:00