MathGroup Archive 2009

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

Search the Archive

strange effect of using Item[] around Control[] in Manipulate[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105564] strange effect of using Item[] around Control[] in Manipulate[]
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Wed, 9 Dec 2009 05:43:13 -0500 (EST)

Version 7,

I use Item to help me arrange the layout of Controls more easily.

I noticed the following "issue". Consider the following  example:

Manipulate[Null,
          Control[{{a, 5, "a"}, 1, 10, 1}],
          Control[{{b, 0.5, "b"}, 0, a, 0.01}]
]

In the above, control variable "b" has it maximum defined by the
control variable "a".  This works ok. I us the above type construct in
many placed since the maximum value of some variable depend on the
setting of another variables.

Now, if I wrap the above Controls in Item[], then the above will no
longer get setup correctly:

Manipulate[Null,
         Item[Control[{{a, 5, "a"}, 1, 10, 1}]],
         Item[Control[{{b, 0.5, "b"}, 0, a, 0.01}]]
]

Now when running the above, notice that the second control is not set
up, because now its maximum value "a" is no longer seen as a the other
Manipulate control variable so its value is unknown.

Wrapping Item[] around it caused this problem.

Is this the expected behavior of Item in this context?

thanks,
--Nasser


  • Prev by Date: Re: Simple Stock Options Calculation
  • Next by Date: Re: JLink broken on Snow Leopard
  • Previous by thread: Re: Problem with FramedStyle when using inside Framed[]
  • Next by thread: Re: strange effect of using Item[] around Control[] in Manipulate[]