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


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

Manipulate and Module

Started bySergio Miguel Terrazas Porras <sterraza@uacj.mx>
First post2013-12-05 08:03 +0000
Last post2013-12-06 07:11 +0000
Articles 2 — 2 participants

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


Contents

  Manipulate and Module Sergio Miguel Terrazas Porras <sterraza@uacj.mx> - 2013-12-05 08:03 +0000
    Re: Manipulate and Module "Nasser M. Abbasi" <nma@12000.org> - 2013-12-06 07:11 +0000

#16319 — Manipulate and Module

FromSergio Miguel Terrazas Porras <sterraza@uacj.mx>
Date2013-12-05 08:03 +0000
SubjectManipulate and Module
Message-ID<l7pc1c$gc6$1@smc.vnet.net>
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?

Thanks,

Sergio Terrazas

[toc] | [next] | [standalone]


#16327

From"Nasser M. Abbasi" <nma@12000.org>
Date2013-12-06 07:11 +0000
Message-ID<l7rtb5$o59$1@smc.vnet.net>
In reply to#16319
On 12/5/2013 2:03 AM, Sergio Miguel Terrazas Porras wrote:

> I modified many of my notebooks, putting a Manipulate inside the Module,

Why?

You should think of Manipulate as the main front GUI to the app
or the computation engine.

A GUI is always the most front end.

GUI takes input from user, and call the back-end functions
for computation, and then send the result back to the user via
the GUI windows or by other means such as to database, files, etc..

Putting the GUI inside a function makes little sense to me. functions
do not call the GUI. The GUI calls other functions.

--Nasser

[toc] | [prev] | [standalone]


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


csiph-web