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 > >
- References:
- Interpretation with If
- From: "Matthias Gottschalk" <mgott@gfz-potsdam.de>
- Interpretation with If