Tag Info

New answers tagged

17

If you are serious about using this extensively, consider making a function based on CreateDocument... Here is one way to pursue Szabolcs's line of thought. What follows is a function based on CreateDocument[] that can be used in conjunction with the (now somewhat neglected) option DisplayFunction, which handles where the output of graphics functions ...


14

You can always create a new notebook and put things in it. If you are serious about using this extensively, consider making a function based on CreateDocument that sets the appropriate options for the notebook to look good. Check what CreateDocument@Plot[Sin[x],{x,0,10}] does. Or use a quick-and-dirty hack based on CreatePalette: fig = CreatePalette[#, ...


1

I'm guessing that you want to produce an interactive application in which the user changes any of a set of parameters and then clicks on a button to indicate that the new parameters are to applied. That sort of thing is usually done within a Manipulate expression. Here is an simple example of such an expression -- a solver for quadratic equations. ...


3

In the documentation of Button, under Options -> Method, it says: By default, button functions are evaluated on a preemptive link and time out after 5 seconds: DynamicModule[{a = "start"}, {Button["does time out", Pause[6]; a = "end"], Dynamic[a]}] Use Method->"Queued" to evaluate button functions on the main link, which never times out: ...


1

Is this what you want? doStuff := Module[{}, (* do stuff *)]; Button["Do stuff", doStuff] Here you can put whatever you want in doStuff.


3

Something like this is a good start. I tried to write it in a way to make it easy to expand. ruleListQ[{r__Rule}] = True; (* JSON won't have RuleDelayed *) ruleListQ[_] = False; formatJSON[json_] := Switch[json, _?ruleListQ, (* dictionary *) Column@Replace[json, HoldPattern[a_ -> b_] :> OpenerView[{a, formatJSON[b]}], {1}], _?(ArrayQ[#, _, ...



Top 50 recent answers are included