Re: Display Workspace
- To: mathgroup at smc.vnet.net
- Subject: [mg112373] Re: Display Workspace
- From: WWeaver <wayne.w.weaver at gmail.com>
- Date: Sat, 11 Sep 2010 05:44:54 -0400 (EDT)
- References: <i6a5fq$kkt$1@smc.vnet.net> <i6crac$s4h$1@smc.vnet.net>
On Sep 10, 4:47 am, Albert Retey <a... at gmx-topmail.de> wrote:
> Hi,
>
> > Is there a way to dynamically display and update all currently defined
> > global variables and their values/definitions?
>
> You could try something along these lines:
>
> $NewSymbol = Function[
> GlobalInspector`trigger = AbsoluteTime[]]
>
> GlobalInspector`trigger = AbsoluteTime[]
>
> CreateDialog[Dynamic[
> GlobalInspector`trigger;
> Grid[{#, ToExpression[#, InputForm,
> Function[Null, InputField[Dynamic[#], ImageSize -> 500],
> HoldFirst]]} & /@ Names["Global`*"], Alignment -> Left],
> TrackedSymbols :> {GlobalInspector`trigger}]]
>
> it has some deficiencies, though: there is no way that I know of to
> update when a variable is removed with Remove (you could use a fixed
> UpdateInterval, but that also might have implications). Another problem
> is that a Remove will actually not Remove anymore, since the symbols are
> still existing in the Dynamics. Of course the appearance and behaviour
> of the dialog is also not very elaborated.
>
> > Im trying to come up with some code to that will emulate the
> > "Workspace" window in another system's session, but I am having difficulty
> > getting it to work.
>
> If you are relatively new to Mathematica, an inspector for global
> variables is not something that is very simple to program and as
> mentioned might even have some conceptual problems. I don't know whether
> it is my background in Mathematica, but such an inspector is not a
> feature that I miss very much in Mathematica, why do you think it is so
> important to have it? Interacting with Mathematica means typing
> commands, there is no way to completely avoid it. And in spite of all
> the screen fondling enthusiasm these days for many tasks typing still is
> the most efficient way to interact with a computer. Considering this it
> is often much more efficient to just do
>
> ?variablename
>
> to see whether a variable exists or not and what value it has and
>
> variablename = 1
>
> to set it than to switch to another window, search the variable, click
> there and edit an input field. If you are afraid of all the typing, I
> would like to mention the "Complete Selection" menu entry which has a
> keyboard shortcut (Ctrl-K on Windows) which saves you from many
> keystrokes and typos.
>
> Note that what is called "Workspace" in the other system is known as
> "Namespace" in general and as "Context" in Mathematica.
>
> hth,
>
> albert
Thanks Albert,
That helps. I dont really have a need to for a "Workspace", but I am
trying to teach more with Mathematica. Most of my graduate electrical
engineering students are use to other systems that have a workspace.
I thought it may be easier for them to adopt and adjust to Mathematica
if I could provide some of the gui functionality that they may be use
to.
Thanks for the help.
Wayne