MathGroup Archive 2008

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

Search the Archive

Dynamic

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87349] Dynamic
  • From: Gianluca Gorni <gianluca.gorni at dimi.uniud.it>
  • Date: Tue, 8 Apr 2008 05:38:04 -0400 (EDT)

Hi!

I am trying to learn how the new Dynamic features work.

The following two Manipulate expressions give outputs that
make perfect intuitive sense to me:

Manipulate[q = p + 1;
  q,
  {p, 0, 1}]

Manipulate[q = p + 1;
  FullForm@q,
  {p, 0, 1}]

(don't keep both outputs active at the same time
if you are short on battery power!)

When I try to reproduce similar effects with
DynamicModule, I get all sorts of different behaviours.
Compare the following:

DynamicModule[{p = 0, q},
  q = p + 1;
  {Slider[Dynamic@p], q}]

DynamicModule[{p = 0, q},
  q = p + 1;
  {Slider[Dynamic@p], Dynamic@q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p] + 1;
  {Slider[Dynamic@p], q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p] + 1;
  {Slider[Dynamic@p], FullForm@q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p] + 1;
  {Slider[Dynamic@p], FullForm@Dynamic@q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p] + 1;
  {Slider[Dynamic@p], Dynamic@FullForm@q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], q[[1, 1]]}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], q[[1, 2]]}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], Dynamic@q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], Dynamic[q[[1, 1]]]}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], Dynamic[q[[1, 2]]]}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], FullForm@q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], Dynamic@FullForm@q}]

DynamicModule[{p = 0, q},
  q = Dynamic[p + 1];
  {Slider[Dynamic@p], FullForm@Dynamic@q}]

Right now all I need is a few kind words of encouragement
from somebody who has already mastered dynamic interactivity...

Gianluca



  • Follow-Ups:
    • Re: Dynamic
      • From: Arnoud Buzing <arnoudb@wolfram.com>
  • Prev by Date: Re: CreateDialog Pecularity
  • Next by Date: Re: Poisson equation with boundary conditions on rectangle
  • Previous by thread: Re: ListCorrelate on lists with different sampling rates
  • Next by thread: Re: Dynamic