Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: Manipulate and Module

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132101] Re: Manipulate and Module
  • From: Itai Seggev <itais at wolfram.com>
  • Date: Fri, 6 Dec 2013 02:54:53 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20131205080530.0CCA06A27@smc.vnet.net>

On Thu, Dec 05, 2013 at 03:05:30AM -0500, Sergio Miguel Terrazas Porras wrote:
> Hello folks!
> 
> I had been using Module for a while, to avoid conflcts among variables in several functions used in the same notebook.
> 
> When Manipulare came around, I modified many of my notebooks, putting a Manipulate inside the Module, something like this:
> 
> function[var1_,var2_,...]:=Module[{internal list of vars},   Manipulate[something,{var,vinit,vfinal}]  ]
> 
> But once in a while I encountered problems when opening a notebook.
> 
> Something like Show[can not combine graph1 with graph2] etc.
> 
> Now, the other way woulb be to interchange Module and Manipulate, putting the Module inside the Manipulate.
> 
> What are the main differences between these two aproaches, and which one is the preffered one?

Without seeing the code, it is difficult to say.  But I doubt that it is
related to your issues.  Manipulate must have access to the appropriate
definitions in order to work, which if you're opening it in a fresh session it
might not.  I would guess that adding the option SaveDefinitions->True to your
Manipulate will solve your problems.

--
Itai Seggev
Mathematica Algorithms R&D
217-398-0700 



  • Prev by Date: Re: Laptop numpad enter does not evaluate cell
  • Next by Date: Re: LocatorPane and tooltips for the locators
  • Previous by thread: Re: Manipulate and Module
  • Next by thread: Re: Manipulate and Module