Consider the following ( working ) snippet:
Manipulate[
Column[{
Manipulate[
vote,
{vote, {"Yes", "No"}},
Initialization :> {votes = 0}
],
k,
Button["TEST", Print[votes]]
}],
{k, 1, 5, .5}
]
My question concerns programming style and Outer/Inner Manipulate structures. What is the best way to handle code that is executed conditionally based on values in the inner Manipulate, but needs to be processed further in the outer Manipulate? I.e. checking thresholds, maintaining sub-totals, balancing, etc.
To make my question 'answerable' I have translated it in terms of a simplified example: how / where would you maintain a Yes vote counter that is used in the outer manipulate?
UPDATE: The requested pattern would also apply to synchronizing views in data on Tabs on a TabView.