I've reduced some of my code to the code here
Manipulate[
(*output here here*)
{j, 1, 40, 1},
{k, 1, Dynamic[j], 1},
]
The problem I'd like to fix is that if I set j to 40, then k to 35, and then set j down to 20, a bunch of errors get thrown. Is there a way to add something to the code here that when j gets updated k gets reset to 1?
{j, 1, 40, 1}
with{j, 1, 40, 1, TrackingFunction -> (j = #; k = 1; &)}
? $\endgroup${j, 1, 40, 1, TrackingFunction -> (j = #; k = Min[#, k]; &)}
to resetk
toj
whenj
moves below current value ofk
(as in Nasser's answer). $\endgroup$