MathGroup Archive 2008

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

Search the Archive

Re: Interpretation with If

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87302] Re: [mg87260] Interpretation with If
  • From: bsyehuda at gmail.com
  • Date: Mon, 7 Apr 2008 05:16:19 -0400 (EDT)
  • References: <200804061040.GAA14287@smc.vnet.net>

Hi,
You need to change the place of the Dynamic function. The If statement is
not evaluated dynamically.

This one works

Interpretation[{init = 0},
 Panel[TabView[{Style["Initialization", Plain] ->
     RadioButton[Dynamic[init], 1],
    Style["Start", Plain] ->
     Dynamic[If[init == 1, Style["True", Green, Italic],
       Style["False", Red, Bold]]]}]], 1 + 1]

best
yehuda

On Sun, Apr 6, 2008 at 1:40 PM, Matthias Gottschalk <mgott at gfz-potsdam.de>
wrote:

> Hello
>
> I play around with the Interpretation function and
> encounter
> the following:
>
> While this works:
>
> Interpretation[
>  {init = 0},
>  Panel[
>   TabView[
>    {
>     Style["Initialization", Plain] ->
> RadioButton[Dynamic[init], 1],
>     Style["Start", Plain] -> Dynamic[init]
>     }
>    ]
>   ],
>  1 + 1
>  ]
>
>
> The following doe not:
>
>
> Interpretation[
>  {init = 0},
>  Panel[
>   TabView[
>    {
>     Style["Initialization", Plain] ->
> RadioButton[Dynamic[init], 1],
>     Style["Start", Plain] ->
>       If[Dynamic[init] == 1,
>       Style["True", Red, Italic],
>       Style["False", Red, Italic]
>       ]
>     }
>    ]
>   ],
>  1 + 1
>  ]
>
> The If statement is not evaluated.
> Does anybody what I am doing wrong?
>
> Regards
>
> Matthias
>
>


  • Prev by Date: Re: What determines #1 and #2 values (with &) for ContourLabels?
  • Next by Date: Re: A problem with solving some nonlinear system
  • Previous by thread: Interpretation with If
  • Next by thread: CreateDialog Pecularity