# Tag Info

4

How about this: ClearAll[framed, button, $opts];$opts = {}; Options[framed] = {a -> 1}; button[x_] := With[{opts = $opts}, Button[x, Print@framed[x, opts]]]; framed[x_, opts : OptionsPattern[]] := Block[{$opts = Flatten[{opts}]}, Framed[{button[x], OptionValue@a}] ]; and you use this as before: Print@framed["Push", a -> 1111] ...

4

The problem seems to be that a TagBox that is generated is handled incorrectly by the front end. The TagBox has the form TagBox[bigExpr, Deploy, DefaultBaseStyle -> "Deploy"]. In this expression the second argument Deploy is quite meaningless. I couldn't trace any further than this TagBox as I cannot see how the front end handles it. How the kernel ...

3

Quick fix is to add ContentSelectable -> False, ImageSize -> Dynamic[Automatic, None] to Graphics options. Now the it is behaving well with exeption of orange frame that appears to allow you to change ImageSize, which is supressed by Dynamic[#, None]. More generic approach Something strange is happening. When we set Deployed -> True and ...

3

(This is more of an extended comment until a better understanding evolves.) Finally I've found the relevant MathGroup thread from old - apparently the behaviour is as old as the dynamic interactivity in Mathematica. At that time, Norbert Pozar introduced a really simple example to demonstrate the strange internals of DynamicModule when a symbol in an ...

3

Well, that's not a full answer but a walkaround. I've noticed that even when only moving cursor in front of image2 (without LocatorPane) CPU usage is raising to 50% and supressing Tooltips does not change much. So since you want them, leave them, and Rasterize the rest: point = {0.4, 0}; Row[{ Overlay[{ Rasterize@image2, ...

3

To mimic Manipulate, wrap the body in Dynamic: DynamicModule[{x, y}, Dynamic[ y = f[x]; {Slider[Dynamic[x]], Dynamic[x], Dynamic[g[y]]}] ] (It's what Manipulate does.) But putting the y code inside its own Dynamic is a little cleaner: DynamicModule[{x, y}, {Slider[Dynamic[x]], Dynamic[x], Dynamic[y = f[x]; Dynamic[g[y]]]} ]

3

Use Dynamic inside Mouseover Graphics[{ Mouseover[{Black, Disk[{-10, 0}]}, Dynamic[{m = "D"; Red, Disk[{-10, 0}]}]], Mouseover[{Black, Rectangle[{10, 0}]}, Dynamic[{m = "R"; Red, Rectangle[{10, 0}]}]], Dynamic@Text[m, {0, 0}] }, ImageSize -> 400]

2

This uses the second argument of dynamics, which acts like an event call back. In there, you do the specific action needed when that dynamic changes. This localizes the logic with its own control variable. Makes it easier to manage. If you like more information about this method, see this question But you really need to fix/improve the way the function ...

1

Maybe this does what you want? DynamicModule[ {enabled = True, pos}, Column[ { Dynamic[ Print[DateString[] <> " updating"]; EventHandler[ Graphics@Disk[], {"MouseClicked" :> Print["Click"]} ] ] , Dynamic[pos[]] } ] , Initialization :> (pos[] := MousePosition["Graphics"]) ] Really... trial and error.

1

Unfortunately FullGraphics is extremely out-of-date: it seems that it has not changed much since version 5. Currently correct solution may be only FrontEnd-based. FrontEnd has a command Convert Dynamic to Literal under Evaluation menu which helps with Dynamic but not with Ticks. A workaround for Ticks is Exporting the complete Graphics[...] as a Notebook, ...

1

I modified your code to eliminate some numerically induced imaginary fuzz. ClearAll[y, k]; m = 0.5; λ = 1/187.; k[0] = 0; y[0] = 0; r[t_Integer, z_] := Chop @ N[1/z^m (-(1/λ)*E^(-λ*z) + 1/λ + k[t - 1]*λ* Integrate[(z - w)^m*E^(-λ*w), {w, 0, z}])]; y[t_Integer] := y[t] = Chop @ N @ ArgMax[{Re@r[t, j], j > y[t - 1]}, j]; k[t_Integer] := k[t] = Chop ...

1

Problem 1 Your first problem seems to be related to a subtle bug (?) which results in a Dynamic[t] to be treated slightly different than a Dynamic[something[t]]. You can get the first button to work with either double negating the boolean as you did or by using TrueQ[t] (which might be a good idea in the sense of of defensive programming anyway). So this ...

1

The following code works. But, I am not sure if it was you are trying to achieve: Version 1 creating a dialog as seems to be your intent (your code but with an additional image: imageIUsed = ExampleData[{"TestImage", "Clock"}] anotherImage = ExampleData[{"TestImage", "Airplane"}] maniTransform[image_] := Manipulate[ Row[{Show[{Image[image], ...

1

I think you may have too many Dynamic calls. This seems to start at the desired state 1 after each re-evaluation. Manipulate[tick; Dynamic@Switch[tabNumber, tab1, Plot[x^2, {x, 0, 1}], tab2, Plot[1 - x^2, {x, 0, 1}], _, Plot[Sin[x] E^(-x), {x, 0, 1}]], TabView[{"1" -> Column[tabNumber = tab1; {Row[{"1 selected"}]}], "2" -> Column[tabNumber ...

Only top voted, non community-wiki answers of a minimum length are eligible