Message Boards Message Boards

DynamicModule, creating a Association structure of ActionMenus, variables

Posted 2 years ago

Using DynamicModule, I created by ( function name, mkSymBtn) a powerful ActionMenu widget so it can save its definitions. It works great; note each is unique by name and use; tried to use unique var names too (though learning how to use Unique within a DynamicModule might be needed). None of the ActionMenus need to use any Dynamic to refresh its Gui.

Evaluating mkSymBtn once within a Cell works well every time; in different Cells. However, when I evaluate the function within a List in a Cell

{mkSymBtns5@"string1", mkSymBtns5@"string2", mkSymBtns5@"string3"}

or

   temp = mkSymBtns5@# & /@ {"string1", "string2", "string3"};
    temp

the ActionMenu's created some how uses data everytime from a var use from the last item; thus corrupting the other others preventing them to work correctly. Am guessing it is due to the Cell Context?? Does the nature of ActionMenu hinder what am seeking? So...how does one evaluate the creation of ActionMenus so each keep its definitions and standalone where its vars are not bleeding into the others?? Or is there a limit to using DynamicModule in creating many unique widgets?? Thanks.

POSTED BY: Andrew Meit
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract