using Reactive, Interact idx = slider(1:3) display(idx) array_elem = lift(i -> A[i], idx)
Or, to the same effect @manipulate for 1=1:3 A[i] end On Sunday, August 2, 2015 at 6:38:40 AM UTC+5:30, Júlio Hoffimann wrote: > > Hi, > > Suppose I have: > > idx = slider(1:3) > > How do I use the value stored in the widget to index an array, let's say > A[idx]? I tried playing with signal() and @lift, but none worked. Could you > please explain what is the correct approach? > > -Júlio >