MathGroup Archive 2008

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

Search the Archive

Re: Dynamic GUI problem II.

  • To: mathgroup at
  • Subject: [mg89508] Re: Dynamic GUI problem II.
  • From: dh <dh at>
  • Date: Wed, 11 Jun 2008 03:18:55 -0400 (EDT)
  • References: <g2fub0$2fs$> <g2j0ab$558$> <g2lbf9$9aq$>


hope you come not back with an even trickier problem. Anyway, during 

playing around I got the impression that Dynamic still has some 

problems. Here is one way of doing what you want:









hope this helps, Daniel

zac wrote:

> Thank you for the reply, it partly solves my problem, but what if I

> want to control the length of the array 'vars' as well with a slider?

> Here is my proposed - not working - layout, based on your code:


> Remove[vars, a, x, v, n];

> {Slider[Dynamic[n], {1, 5, 1}], Dynamic[n]}

> a = Table[RandomReal[], {n}]

> vars = Dynamic /@ Array[v, {n}];

> x = (Slider[#, ImageSize -> 50] & /@ vars)

> MapThread[Set[Evaluate[#1[[1]]], #2] &, {vars, a}];

> vars


> Clearly the problem starts when variables 'a' and 'vars' do not update

> with the change of n. Of course, if I wrap the Table[...] and Array[]

> expressions into Dynamics, MapThread won't recognize them as lists. Is

> there any way to define 'n' as an always-dynamic-variable (other than

> incorporating the whole thing into a Manipulate)?

> Any ideas?


> Istvan



Daniel Huber

Metrohm Ltd.

Oberdorfstr. 68

CH-9100 Herisau

Tel. +41 71 353 8585, Fax +41 71 353 8907

E-Mail:<mailto:dh at>


  • Prev by Date: Re: Transform list of numbers into pure functions using replace rule
  • Next by Date: Re: Problem inputting data into a table that is larger than a window
  • Previous by thread: Re: Dynamic GUI problem II.
  • Next by thread: Re: Dynamic GUI problem II.