0

I am trying to get a PopupMenu in Manipulate that will be dynamically updated. The code that seems correct is below:

DynamicModule[
 {
  a = Table[
    Association[
     Table[Association[
       Table[ToString@i -> RandomInteger[50], {i, 0, 3}]], 10]], 10]
  },
 Manipulate[
  {x, y},
  {{x, First@Keys@First@a}, Keys@First@a, ControlType -> PopupMenu},
  {{y, First@Union[#[x] & /@ a]}, Union[#[x] & /@ a], 
   ControlType -> PopupMenu}
  ]
 ]

but instead I get this:

enter image description here

I guess I should do something like SynchronousUpdating to make it work but still have no luck

grandrew
  • 550
  • 2
  • 10
  • Does it answer you question? https://mathematica.stackexchange.com/q/1199/5478 – Kuba Nov 12 '18 at 12:53
  • I have made it a duplicate because it boils down to creating dynamic controllers which linked answer addresses. Let me know if you disagree. Here is another related topic: https://mathematica.stackexchange.com/q/5409/5478 – Kuba Jan 07 '19 at 07:21

0 Answers0