Reputation
7,781
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
28 51
Newest
 Nice Answer
Impact
~30k people reached

Aug
16
awarded  Nice Answer
Aug
13
awarded  Enlightened
Aug
13
awarded  Nice Answer
Aug
10
answered How to set font color for display formula to be same as the cell in which the display formula resides?
Aug
10
comment Alternative to NotebookLocate or NotebookFind
The v8 solution has another problem. It fails to find cells with multiple cell tags. E.g., a cell with CellTags->{"tag", "abc"}.
Aug
10
comment Alternative to NotebookLocate or NotebookFind
Surely, you want instead NotebookRead /@ Cells[EvaluationNotebook[], CellTags -> "CellTag"]. By using First, you're only getting the first of many cells, or generating an error condition when you try to get the first of zero cells.
Aug
10
answered What are the advantages of using .nb rather than .m files?
Aug
10
comment What is the right way to construct DynamicModule
Using Rule (->) instead of RuleDelayed (:>) is virtually always the wrong thing to do. In your case, for example, it produces output which is subtly broken in ways it will take you a while to figure out (i.e., if you quit and restart the kernel or FE, you'll lose the definition of st2 in any Dynamic contexts).
Aug
7
comment Why are there two separate MathKernel processes running when I start up Mathematica 9?
Accessing the kernel is easy. Just set the Evaluator option to "System". E.g., Dynamic[$PasswordFile, Evaluator -> "System"]. That's exactly how we do it for our code. It doesn't require privileged access or anything. But completion doesn't run through the System kernel. See my answer for an explanation. And, if you destabilize the System kernel...well, that's on you.
Aug
7
awarded  Necromancer
Aug
7
awarded  Revival
Aug
7
answered Why are there two separate MathKernel processes running when I start up Mathematica 9?
Aug
6
comment Want actual cell data from CellEvaluationFunction
@Liam Actually, my comment was confused and didn't make much sense. SE wouldn't let me edit it anymore, so I just deleted it.
Aug
6
comment Want actual cell data from CellEvaluationFunction
@Mr.Wizard The use of EvaluationCell as a selector for SelectionMove, while no longer supported in v9, still seems to work, and also works in older versions. E.g., SelectionMove[EvaluationNotebook[], All, EvaluationCell]
Aug
3
comment Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module
Incidentally, the Dynamic solution is an intriguing solution, and I don't see any reason to disrecommend it in your answer. Perhaps somebody will find some stupid bug to make me eat those words. But I wouldn't argue against the solution on principle.
Aug
3
comment Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module
As the question is currently posed (it's been through several dramatic edits...hopefully my comment will still be relevant for a while), the code should work. That it doesn't is a bug. I've fixed it for a future release of Mathematica.
Aug
3
comment Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module
Different DynamicModule instances must have their variables tracked separately in the kernel. Why doesn't the kernel just use the same names and clean everything up afterwards? Because the kernel participates in the system which determines when a Dynamic needs to be updated. It does so by tracking changes to named variables. So these variables have to have a kernel footprint. And if there are two identical DynamicModules hanging about, we're going to have to differentiate their variables. So, we chose to do so using a name decoration not unlike the one Module uses.
Aug
3
comment Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module
For anyone who cares about the underlying implementational details mentioned here (which should not be necessary or relied upon for top-level use of DynamicModule), it's useful to explain why variables have two representations. Imagine if you take a DynamicModule object and copy it. It should be a precise copy, which includes copying the variable names precisely. And the FE has no problem isolating duplicate variable names in different instances of DynamicModule. But, sometimes, to resolve a Dynamic, the FE must send something to the kernel. (to be continued)
Aug
3
comment Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module
This answer says many things which are correct, but some things which are either incorrect or misleading. Chief among them is the notion that I have ever said that mixing Dynamic and/or DynamicModule with Manipulate is a bad idea. I have never said or implied that. Yes, it is true that this particular usage of DynamicModule with Manipulate does not work, but it's a fluke, not a sign of a systemic issue or misunderstanding. Attempts to mix Module and Manipulate, on the other hand, inevitably result from a systemic misunderstanding of the system and should be avoided entirely.
Aug
1
answered Want actual cell data from CellEvaluationFunction