Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6658 > unrolled thread

Re: What is the point of having Initializations in DynamicModule and Manipulate?

Started by"Nasser M. Abbasi" <nma@12000.org>
First post2011-11-23 12:14 +0000
Last post2011-11-23 12:14 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: What is the point of having Initializations in DynamicModule and Manipulate? "Nasser M. Abbasi" <nma@12000.org> - 2011-11-23 12:14 +0000

#6658 — Re: What is the point of having Initializations in DynamicModule and Manipulate?

From"Nasser M. Abbasi" <nma@12000.org>
Date2011-11-23 12:14 +0000
SubjectRe: What is the point of having Initializations in DynamicModule and Manipulate?
Message-ID<jaio2i$ep8$1@smc.vnet.net>
On 11/22/2011 4:43 AM, Armand Tamzarian wrote:

>
> that was what I expected. whereas
>
> In[]=ClearAll[g];
> DynamicModule[{},
>   g,
>   Initialization :>  {g = "hello world"}]
>
> Out[]= g
>
> this is not what I expected because I thought the initialization would
> establish the global value of g and therefore that value would be
> *displayed*. (I do not expect g to dynamically update. How can it?)
>

Hi;

If you change :> to -> then you get the output you want:

---- cell one ---------------
In[9]:= ClearAll[g];
-------------------------

------- cell 2 ---------------------
In[10]:= DynamicModule[{},g,Initialization->{g="hello world"}]
------------------------------------

Out[10]= hello world

Not sure though if this is a solution that you could use
for your main work, but just wanted to point this out.

--Nasser

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web