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

Jan
30
awarded  Yearling
Jan
26
comment MathLink linking error after OS X 10.9 (Mavericks) upgrade
Just a note that, in 10.4 (coming probably in a month or so), the default MacOS MathLink library will be switched to use libc++ by default. The framework will continue to host the older, libstdc++ version of MathLink using Apple's standard framework versioning scheme.
Jan
3
awarded  Nice Answer
Jan
1
comment Docked cell showing keystrokes and mouse buttons actions
@P.Fonseca I mean that, the way Mathematica implements its event handling (which is fairly standard), the operating system steals the keyboard event before Mathematica sees it and transforms it into a menu command event. It's not that it's impossible to capture the keyboard event before it's transformed...it's that there's no very compelling reason for Mathematica to do otherwise (and bear the extra complexity, risk of bugs, extra developer hours contributed to this, etc.).
Dec
31
answered Overlay vs Show for plots?
Dec
31
comment Panning with Mouse + Moving A Curve
I have some code you might be interested in. It's not a proper answer to this question because it doesn't allow for dragging of curves. But what it does do is to allow arbitrary panning, by interactively changing the variable range and PlotRange. So, unlike the other solutions here, you won't hit a wall if you pan too far. It also, somewhat amusingly, supports "throwing". I don't have it anywhere at the moment, but if there's interest, I could maybe throw it up on a Github gist or something.
Dec
31
comment How to have an Input cell that doubles as an Output
Another possibility is the use of a template notebook to generate the notebook you wish to redistribute. The template notebook does exactly the sort of transformation (output replacing input) that you describe, but as part of a deployment step rather than an interactive widget like the one you describe. If the non-interactive, deployment-based approach is appealing to you, I could write it up as an answer.
Dec
31
comment How to have an Input cell that doubles as an Output
Sometimes people ask questions which, even if properly and successfully answered, wouldn't represent the best solution to the actual problem they're experiencing. That's why I want to understand your problem, and why one existing solution to that problem was not sufficient for you. Given your problem, I would have gravitated toward a tagging-based solution...perhaps to the end of automatically reverse-closing the appropriate cell groups. It's unclear from your description whether you would find such a solution adequate and, if not, why not.
Dec
31
comment Docked cell showing keystrokes and mouse buttons actions
Some limitations could be dealt with by cleverer coding than I was willing to put the effort in for here. Perhaps somebody would like to follow up with an answer that builds on mine and improves it. But the limit of not having a "KeyUp" event handler is very problematic. And perhaps not too difficult to resolve in a future version of Mathematica. But the limitation of it not showing things like Ctrl+Z because the operating system snatches the event...that's more fundamental, and seems less likely to see a solution in the foreseeable future.
Dec
31
comment Overlay vs Show for plots?
Your statement about rasterization is not true. Overlay never rasterizes anything. The point is that Show called on multiple Graphics objects will always return something with head Graphics that has effectively merged the primitive list and options, while Overlay returns a thing with head Overlay that merely shows the items (which need not be graphics) visually stacked.
Dec
31
comment How to change default font for all existing notebooks at once?
Out of curiosity, which operating system were you on?
Dec
31
answered Docked cell showing keystrokes and mouse buttons actions
Dec
31
comment How to have an Input cell that doubles as an Output
I would have thought that the ability to close a cell group, alternatively on the Input cell or reverse-closing on an Output cell, would have been pretty close to what you're looking for without trying to invent a new interface. Certainly I see reverse-closing as a very common way of hiding implementation in notebooks.
Dec
31
comment Optional throws error when called from a package. Workaround?
I agree that the StandardForm ToExpression output seems wrong. I couldn't find an existing bug report about this, although it's likely to be an old bug. I've opened the bug report. Any licensed user who is interested in being notified when this bug is resolved can ask Tech Support to attach their contact information to bug 305932.
Nov
15
awarded  Nice Answer
Oct
8
comment How to run existing mathematica nb from Java
@KonstantinStolpovsky, in the short run, you're probably going to have to work with Szabolcs' solution, which is to use a package file. Because of bugs I mentioned in my previous comment. But that having been said, your code has a completely unnecessary reference to EvaluatePacket in it. You may wish to correct it in your question.
Oct
8
comment How to run existing mathematica nb from Java
Actually, @Szabolcs, I would claim that this code should work. But it is an unfortunate truth that the history of NotebookEvaluate running from a standalone kernel is a troubled one. I believe the relevant issue here is that there is a known and reported bug that, if a kernel has a parent link other than the FE, then UsingFrontEnd[NotebookEvaluate[...]] can fail. I partially fixed this for 10.3, but troubles remain. That having been said, there is a minor bug in the code here. See next comment.
Oct
8
awarded  Necromancer
Oct
8
comment What is the point of Refresh if Dynamic has an UpdateInterval option?
@RolfMertig, Refresh is not widely deployed in v10. It is deployed where necessary. Your speculation about widespread slowdowns, if warranted generally, is not applicable to a connection with Refresh specifically (particularly since v10 has nothing new in regards to Dynamic).
Oct
8
comment What is the point of Refresh if Dynamic has an UpdateInterval option?
@AlbertRetey, I'm talking about a situation where a developer is making f available for your use by users. If I don't have end-to-end control, then I have to anticipate any usage. It's not reasonable for me to tell users to hack around my problems. That having been said, this certainly does not arise in many functions. Functions developed with no side effects (which is quite a lot of them) won't exhibit this behavior. For example, in 10.0.0, there was an infinite Dynamic triggering bug in GeoGraphics. The solution finding the accidental side effects and removing them, not Refresh.