Does there exist a technique to construct a Cell
that allows you to both auto update a Dynamic variable and allows you select the code while the variable is being updated?
For example
Generated from the following code
a = 0;
task = CreateScheduledTask[
a = a + 1
, 1];
StartScheduledTask[task];
Print@Button["RemoveScheduleTask", RemoveScheduledTask[task]];
InputField[Dynamic[a], Number]
Dynamic[a]
Now if I select 100 in the InputField
my selection gets unhighlighted as soon as the variable gets updated, meaning I don't get enough time to edit the variable.
Now if I select the 100 in the second Cell
and attempt to change the value nothing changes because of the nature of how Mathematica works.
The data I am working with is multiline so I would prefer if there was some way to modify the Cell
output so that I could update the variable while the scheduled task runs in the background. The above is a simplified issue of the issue, but illustrates the functionality quiet clearly.
Question: How do I update a varaible's value if is constantly being updated?
InputField
as long as theUpdateInterval
is not shorter then 1 second or so. In my real world code theUpdateInterval
is variable and not controlled by the user. As a side comment, I'm a little more interested in making the DynamicCell
update the variable similar to theInputField
. Ultimately I might end up opening up a separate question describing how I think a Dynamic Cell should really work, but I would like to see if someone comes up with a working solution. $\endgroup$ – William Jul 27 '13 at 19:23Graphics[Circle[{0, 0}], ImageSize -> {100, Automatic}]
not really sure if context helps $\endgroup$ – William Jul 28 '13 at 1:27