Group Abstract Group Abstract

Message Boards Message Boards

1
|
5.7K Views
|
6 Replies
|
5 Total Likes
View groups...
Share
Share this post:

What `Dynamic[expr,f]` is really about?

Posted 11 years ago
POSTED BY: Al Guy
6 Replies
Posted 11 years ago
POSTED BY: Kuba Podkalicki
Posted 11 years ago
POSTED BY: Kuba Podkalicki
Posted 11 years ago

Quote from docs for Dynamic:

continually evaluates f[val,expr] during interactive changing or editing of val.

which explains why your Dynamic is not touching w.

Dynamic[pp, {(pp = #; w = pp^2) &} ] is not interactively changed but automatically when you interactively change InputField content.

Following those points, your code should be rewritten to:

InputField[Dynamic[pp, {(pp = #; w = pp^2) &}]]
Dynamic[pp]
Dynamic[w]
POSTED BY: Kuba Podkalicki
Posted 11 years ago

Because the interactive symbol that is entered is being used in many parts of the program with Dynamics.

POSTED BY: Al Guy
Posted 11 years ago

Can I make it in such a way so that it will evaluate the stufftodo not in continuously monitoring manner but rather after (or while) I finished editing InputField[Dynamic[pp]] like the second argument options in Dynamics?

POSTED BY: Al Guy
Posted 11 years ago
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