Re: strange effect of using Item[] around Control[] in Manipulate[]
- To: mathgroup at smc.vnet.net
- Subject: [mg105583] Re: strange effect of using Item[] around Control[] in Manipulate[]
- From: Yves Klett <yves.klett at googlemail.com>
- Date: Thu, 10 Dec 2009 04:55:54 -0500 (EST)
- References: <hfnuvn$gc3$1@smc.vnet.net>
Hi,
Manipulate[Null, Item[Control[{{a, 5, "a"}, 1, 10, 1}]],
Item[Control[{{b, 0.5, "b"}, 0, Dynamic[a], 0.01}]]]
seems to work.
Regards,
Yves
Nasser M. Abbasi schrieb:
> 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
>