Reputation
8,731
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
32 56
Newest
 Yearling
Impact
~37k people reached

Oct
8
answered What is the point of Refresh if Dynamic has an UpdateInterval option?
Oct
8
comment What is the point of Refresh if Dynamic has an UpdateInterval option?
@Kuba Dynamic evaluates to a thing with head Dynamic. Refresh evaluates to its contents. If you are implementing a function which can be used anywhere, but which must not trigger any enclosing Dynamic unnecessarily, the only way to do this is Refresh. It is literally impossible to do this with Dynamic. Consider, for example, a function which memoizes its results. Inside of a Dynamic, such a function triggers twice because the act of memoization produces a global side effect in the symbol table which will retrigger enclosing Dynamics. Refresh can stop that dead.
Oct
7
comment What is the point of Refresh if Dynamic has an UpdateInterval option?
This is an underrated answer. We do this all the time in Mathematica code. If you have any function which modifies any non-localized symbol for any reason, this is the only way to prevent it from non-stop tickling parent Dynamics. I have, many times, reported bugs to developers around the company for which the fix is to wrap their code in Refresh[#, None]&. Such a change has no effect outside of Dynamic, but exactly the desired effect inside Dynamic.
Oct
7
revised What is the point of Refresh if Dynamic has an UpdateInterval option?
Typo
Oct
7
revised How to Initiate a queued evaluation from a Dynamic GUI without using a Button
Update answer for new versions.
Aug
26
awarded  Informed
Aug
20
awarded  Good Answer
Aug
14
awarded  Revival
Aug
14
answered Hidden parent stylesheet?
Aug
14
comment Reference to multiple stylesheets
@Kuba, my last paragraph indicates that multiple stylesheets lets you mix in "new styles". What I mean by this is stylenames which have not been previously defined. Input/Output are defined in Core.nb, which is ultimately inherited by nearly every stylesheet in the system. Not many styles you've heard of get defined in Core.nb because we don't want to insert hard-coded stylenames into effectively every stylesheet. So, you won't find Section or Title or Code, for example. But Input and Output are so universal to the way the system works, it seemed better just to put them in Core.nb.
Jun
26
comment Reference to multiple stylesheets
That having been said, your statement that multiple stylesheets "don't work" is not strictly true. They don't work for your purposes. But they do work. You can use multiple StyleData[StyleDefinition->...] cells to mix in new styles. So if, in your example, "StyleSheet2.nb" has styles which don't exist in "StyleSheet1.nb", then they will be amalgamated together in your new stylesheet. So it does do something, just not what you were hoping for. Sorry for the multiple commenting, but I don't feel like I'm actually answering your question. Unless you'd accept "no" as an answer. :)
Jun
26
comment Reference to multiple stylesheets
...and these particular computations, although we cache them as much as possible, are one of the most expensive computations in the system. Not to mention the amount of effort to implement which, as has been pointed out in this thread, has a very low payoff because very few people would ever use this feature.
Jun
26
comment Reference to multiple stylesheets
If I have two versions of "Title" inherited from different stylesheets and they define FontColor differently, it is no longer acceptable for me to just take the first one. I must figure out where the information came from for each style. If both stylesheets inherit from Default.nb, but only the second stylesheet overrides Default.nb's version of FontColor, then I must choose the second. If only the first overrides, then I must choose the first. This necessity to not just track option settings, but the precise provenance of each and every option setting is expensive...(continued)
Jun
26
comment Reference to multiple stylesheets
The multiple inheritance problem is not to be dismissed. Styles can be "re-rooted" (effectively told to ignore inheritance) by using StyleData[name, StyleDefinitions->None]. So, let's assume you have multiple stylesheets which inherit from Core.nb. Each one of them defines a new "Input" style. Some re-root "Input" and others don't. What to do? Also, the multiple inheritance problem introduces serious performance issues...(continued)
Jun
9
comment Faded output is printed from dynamic object
@MarcoB, set the aforementioned option setting on $FrontEnd. I.e., CurrentValue[$FrontEnd, {PrivateCellOptions, "EvaluationUnmatchedStyle"}] = {}
May
26
awarded  Custodian
May
26
reviewed Approve ParallelTable and global variables
Apr
28
awarded  Necromancer
Apr
23
answered Asynchronous evaluation on EventHandler
Apr
16
awarded  Nice Answer