MathGroup Archive 2007

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

Search the Archive

clear InputField


What's the best way to assign the value of InputField to a variable
and then clear its contents?

This seems to work:

InputField[Dynamic[y, {
   (y = #) &,
   (z = y; y = "";) &
   }], Number]
Dynamic[z]

But I'm wondering if there's a way to just tell InputField to clear
itself without having to use a dummy variable. Also the fact that I
have to tell InputField to treat the string y as a number seems
strange.

Thanks for the help!


  • Prev by Date: Re: Contour Lines colored by temperature scale
  • Next by Date: Re: MultivariateStatistics Package
  • Previous by thread: Re: Get list of function variables?
  • Next by thread: Hi presision problem