I need to have a few Manipulate
s in different cells synchronize on a few variables.
I have a report with several Manipulate
s in different sections showing different views/summaries of the data. Some of the selection variables are common to all Manipulate
s. When the reader updates one of these common in any of the Manipulate
s I would like all Manipulate
s to update the value of that variable and execute (or maybe execute on "MouseMoved"
so the CDF doesn't crawl).
Using a Notebook level variable (I have CellContext
set to Notebook
in Global Preferences) I can see that the sync
variable is syncing but I can't seem to get the Manipulates
to use it.
sync = 1;
DynamicModule[{d = Range[10]},
Manipulate[
Column[{d[[;; j]], sync}],
{{j, 1}, 1, 10, 1,
TrackingFunction -> {(j = sync) &, (j = #) &, (j = #; sync = #) &}}
],
SaveDefinitions -> True
]
DynamicModule[{d = Range[10, 100, 10]},
Manipulate[
Column[{d[[;; i]], sync}],
{{i, 1}, 1, 10, 1,
TrackingFunction -> {(i = sync) &, (i = #) &, (i = #; sync = #) &}}
],
SaveDefinitions -> True
]
There is the new Channel-Based Communication in version 11 that might help but I don't have that installed yet (and it is experimental). I'll take an 10.4.1 or an 11 solution but I need it to work in CDF. Not certain there is Player Pro for version 11 yet.
Slider
in aManipulate
and have thatManipulate
update interactively. When theSlider
is released the otherManipulate
s should get the final value ofsync
from theManipulate
that was manipulated and then update themselves to that value ofsync
. $\endgroup$ – Edmund Aug 9 '16 at 17:31d[[;; i]]
in the first andd[[;; j]]
in the second does not update. If I move theSlider
in the first to $6$. Then I want thed[[;; j]]
in the second to evaluated[[;; 6]]
when I release theSlider
. Likewise if I more theSilder
in the second to $3$ then I want thed[[;; i]]
in the first to evaluated[[;; 3]]
when I release theSlider
. $\endgroup$ – Edmund Aug 9 '16 at 17:38d[[;; sync]]
then the Manipulate slider can't access it without localizing it and then it can't be used to sync across cells. $\endgroup$ – Edmund Aug 9 '16 at 17:58d[[;;i|j]]
with thatTrackingFunction
. $\endgroup$ – Edmund Aug 9 '16 at 18:10Manipulate
? I may be easier to work withSlider
etc. directly. $\endgroup$ – Mr.Wizard♦ Aug 9 '16 at 21:09