It's a known issue that substituting display boxes doesn't work in encryption, but I thought I was able to put them into associative arrays and it would work. Maybe I'm just extra bad at my job today. Does anyone have a better way to deal with displaybox encryption that is NOT surfing the display tree? Also holding a here or global variable is a non-starter.
do_something = function ({aa}, {Default Local},
cb = aa["cb2"];
rb = aa["rb"];
show(cb<<class name); // this works
show(aa);
cb << Set Items({"1", "2"}); // but this doesn't????
);
gen_dummy_cb_ui = Function ({}, {Default Local},
vlb = Vlistbox(
btn = buttonbox("Press me"),
cb1 = Combo Box ({"Change me", "B"}),
cb2 = Combo Box ({"This should change"}),
rb = radiobox({"1", "2"})
);
aa = Associative Array ({"cb1", "cb2", "rb"}, Eval List ({cb1, cb2, rb}));
Eval (Substitute (
Expr (
btn << Set Function (
Function ({this}, {cb},
do_something(DV_AA)
)
);
cb1 << Set Function (
Function ({this, index}, {cb},
do_something(DV_AA)
)
);
)
,
Expr (DV_AA), aa
));
return(vlb);
);
New Window ("",
gen_dummy_cb_ui();
);