MathGroup Archive 2007

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

Search the Archive

How to use InputField inside Manipulate?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80804] How to use InputField inside Manipulate?
  • From: "Nasser Abbasi" <nma at 12000.org>
  • Date: Sun, 2 Sep 2007 02:55:29 -0400 (EDT)

Any simple example of how to use InputField inside Manipulate?

I looked an InputField docs and at the following: tutorial/GeneralizedInput 
but still nothing I tried works.

This is what I want to do: I need to ask the user for some parameters (which 
I know how to use Manipulate to obtain), but I also want the user to enter a 
free form expression (an equation), and so I need to use InputField, right? 
but I am unable to do this from inside Manipulate.

This is what I tried:

attempt 1
----------
Remove["Global`*"]
foo[equation_] := Print["You typed", equation]
Manipulate[foo[equation], InputField[Dynamic[equation]]]

attempt 2
----------
Remove["Global`*"]
foo[equation_] := Print["You typed", equation]
Manipulate[foo[equation], InputField[Dynamic[equation],Hold[Expression]]]

and few dozen other attempts. So I give up.

If I do not use Dynamic[equation], then how else would I pull out the 
content of an input field?

any help will be appreciated.

Nasser




  • Prev by Date: Re: How to use InputField inside Manipulate?
  • Next by Date: v6.0.1 problems translating previous notebooks...
  • Previous by thread: Re: How to use InputField inside Manipulate?
  • Next by thread: v6.0.1 problems translating previous notebooks...