78 reputation
6
bio website
location
age
visits member for 1 year, 11 months
seen Sep 14 at 19:06

Sep
14
comment ListContourPlot is blank
That was it exactly! Thank you most kindly!
Sep
14
asked ListContourPlot is blank
Sep
9
comment Path must include /TypeSystemLoader.m?
I have sent a note to them on this - they are probably ahead of me on these things.
Sep
9
asked Path must include /TypeSystemLoader.m?
Sep
8
comment Mathematica File Organization
The link above for Mathematica File Organization no longer exists.
Sep
5
revised Building Reusable Custom Controls?
added 1080 characters in body
Sep
4
comment Are there ways to create local variables analogous to a local variable in C++ and other languages?
Agree Szabolcs - For a developer coming into Mathematica from an application development background in C, C++, my expectation for trying to access localX in LocalTestModule[] is a "undefined symbol" message. So I will certainly have to get used to variables created on the fly and keep it in mind when debugging.
Sep
4
comment Are there ways to create local variables analogous to a local variable in C++ and other languages?
I have added an example code snippet. If I have a module that uses a Manipulate with LocalizeVariables->True, I can see the variables used as parameters in the Manipulate. Ideally, I would like the ability to keep the local variables only visible and accessible to their Module and only return what I want to return.
Sep
4
awarded  Editor
Sep
4
revised Are there ways to create local variables analogous to a local variable in C++ and other languages?
added 708 characters in body
Sep
4
asked Are there ways to create local variables analogous to a local variable in C++ and other languages?
Sep
4
comment Local variables in Module leak into the Global context
From the discussion above, it appears local variables as used in C#, C++ functions and other languages are not quite analogous to local variables in Mathematica. One very interesting topic would be a continuation of this thread that outlines methods or patterns that could be used to more closely mimic scoping in other languages.
Sep
4
comment Building Reusable Custom Controls?
They are parameters, however, if I have a Manipulate wrapped in a Module in a .m file, that includes {xParam, 0, 10, 0.5}; xParam is defined in a notebook following the Needs[] statement. Using the LocalizeVariables->True does not keep the variables local to the Manipulate. xParam is visible in the notebook and a value may be assigned to it outside of the Manipulate[].
Sep
4
comment Building Reusable Custom Controls?
What I am seeing is that if I define the control in a .m file, as soon as the Needs[] is executed in a Notebook all of the variables used in Manipulate - (even when LocalizeVariables->True is used) are global and visible. Furthermore, if I Remove[] each of the Manipulate[] variables directly after the Needs[] all Manipulate variables are global, visible and settable. Moving the control code to the Private context has no effect - same behavior.
Sep
4
comment Building Reusable Custom Controls?
Thanks Rom38 - I will give this a try. I am really not understanding the Mathematica version of local. I was expecting local variables to only be visible inside of the Module. However, they are defined and accessible everywhere. I tried moving the control function to a private context - same result - all Manipulate variables are global. Completely confused...
Sep
4
asked Building Reusable Custom Controls?
Sep
3
comment Return a local variable from a Module containing a Manipulate
I'm using DynamicModule[...] around my Manipulate[] and all Manipulate[] variables are visible and settable in the notebook calling MyControl[]. I have set LocalizeVariables->True and all variables used by Manipulate are visible and settable from the calling notebook.
Sep
3
comment Return a local variable from a Module containing a Manipulate
Hi Mr. Wizard - I see them as global because I can see the values of a and b from the notebook that calls MyControl[]. I would like a and b to only be visible as a Dataset returned from MyControl[]. I would like a and b to only have definition inside MyControl[].
Sep
3
asked Return a local variable from a Module containing a Manipulate
Aug
1
comment How can I save a Manipulate's control settings to a dataset?
This is very good information and starts to address some design pattern questions I have been considering. While a Model layer in the classic MVP or MVC Design Pattern could be implemented in earlier versions, the new Dataset makes this more accessible. This line of thought would be another question and from the existing posts, I see some very good thoughts around design patterns are already here. Thank you very much for the code sections and discussions above - extremely helpful.