MathGroup Archive 2008

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

Search the Archive

Grabbing a value from a Dynamic Object

  • To: mathgroup at
  • Subject: [mg86853] Grabbing a value from a Dynamic Object
  • From: Todd Allen <genesplicer28 at>
  • Date: Sun, 23 Mar 2008 01:03:51 -0500 (EST)

Hi Folks,

   I am trying to use a series of control objects,
specifically PopupMenus, so that the input to one
PopupMenu will be used dynamically to provide the
range of values for the subsequent PopupMenu.

   My area is not computer science, but I believe I
get the idea that Dynamic is not evaluated in the
kernal, but rather simply formatted in the front end
of Mathematica.  To extract a Dynamic value I have
been attempting to use the command CurrentValue with
no sucess.

Here is my basic code:

x = Null; y = Null;
totgrades = PopupMenu[Dynamic[x], Range[12]]
temp1 = CurrentValue[totgrades]
gradesnow = PopupMenu[Dynamic[y], Range[temp1]]

I keep getting the error message:

"Range::range: Range specification in
Range[FrontEnd`CurrentValue[BoxData[3]]] does not have
appropriate bounds. >>"

I understand that the Head of temp1 is NOT a number,
but rather is a FrontEnd`, how do
I get a number that the second PopupMenu can actually
use to produce a range of potential inputs from the

I certainly appreciate any advice you might have! 
Mathematica is a wonderful piece of software, but
there are times when it is truly frustating for a

Best regards,


Never miss a thing.  Make Yahoo your home page.

  • Prev by Date: Re: Re: Re: smallest fraction
  • Next by Date: Re: Viewpoint selector for Mac in 6.0?
  • Previous by thread: Re: Funny behaviour of ClipboardNotebook[] (Q: How to copy programmatically?)
  • Next by thread: Re: Grabbing a value from a Dynamic Object