MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Initialization problem in a DynamicModule

  • To: mathgroup at
  • Subject: [mg106634] Initialization problem in a DynamicModule
  • From: István <replicatorzed at>
  • Date: Tue, 19 Jan 2010 05:14:42 -0500 (EST)

Dear Group,

I have some problem with a complex interface inside a DynamicModule.
This is a toy version of the program, which can fully reproduce the

  {x, y, assign, initialize},

    {"", "A", "B"},
    {"w/ assign:", RadioButton[Dynamic[x, (x = #; assign) &], True],
     RadioButton[Dynamic[x, (x = #; assign) &], False]},
    {"w/o assign:", RadioButton[Dynamic@x, True],
     RadioButton[Dynamic@x, False]},
    {"value:", Dynamic@x}
    }, Dividers -> {False, {False, True, True, True, False}},
   Alignment -> {Left, {Center}}],

  Initialization :> (
    assign := (y = x);(* further variables to update *)
    initialize := (x = True; assign); (* initialization function *)

Now for some reason, the radiobuttons do not function as intended (at
least as I want).
The following clicking orders do not work:

[w/ + B] then [w/ + A]
[w/o + B] then [w/ + A]

these work correctly:

[w/ + B] then [w/o + A]
[w/o + B] then [w/o + A]

I guess, that the problem is with the "initialize" (or the "assign")
function. Any idea?
Thanks in advance


  • Prev by Date: Re: Re: Simplify with NestedLessLess?
  • Next by Date: Re: More /.{I->-1} craziness, con brio
  • Previous by thread: Re: Replace list element based on a condition how to
  • Next by thread: Re: Initialization problem in a DynamicModule