Message Boards Message Boards

0
|
2110 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Module vs DynamicModule

Posted 9 years ago

This code works with Module, but not with Dynamic Module, I don't understand why.

Clear[T, n];
Module[{T, n}, T = {};
 Print@InputField[Dynamic[n, {n = #;
      AppendTo[T, n]} &]];
 Print@Dynamic[T];

VS

Clear[T, n];
DynamicModule[{T, n}, T = {};
 Print@InputField[Dynamic[n, {n = #;
      AppendTo[T, n]} &]];
 Print@Dynamic[T];

It seems to be a problem with Print. Why doesn't it behave as expected? CellPrint works though.

POSTED BY: Al Guy
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract