MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Zoom2D - V6 question


Hi Daniel,

In V6 I get an error flag on the option ... BoxForm`ClosingSaveDialog- 
 >False included in your code below.

I searched the documentation and found no such option. Running   
without it did  produce the pallette but using it also produced
error messages (Like "line is not a graphics primitive or directive")  
and a red flagged 2-D graphic? There was however zooming capability.

Appreciate suggestions for a fix as it seems a nice function to have.

Thanks.


Cheers ... Syd

Syd Geraghty B.Sc., M.Sc.
sydgeraghty at mac.com
San Jose, CA

My System

Mathematic 6.0.1 for Mac OS X x86 (32 - bit) (June 19, 2007)  License  
L2983-5890
MacOS X V 10.4 .10
MacBook Pro 2.33 Ghz Intel Core 2 Duo  2GB RAM

On Oct 29, 2007, at 3:31 AM, dh wrote:

>
>
> Hello Murray,
>
> I posted it to this newsgroup, you may find it in the archive. To save
>
> you the trouble, here it is again in *.m format:
>
>
>
> ===========================================
>
> Zoom2D[g0_]:=Module[{g,g1,pp1,pp2},tt=g0;
>
> If[!MatchQ[Head[g0],Graphics|GraphicsBox],CreateDialog[{TextCell 
> ["Zoom:
>
> No Input available."],DefaultButton[]}];Return[];
>
> ];
>
> g=If[Head[g0]=!=Graphics,ReplaceAll[g0,{GraphicsBox- 
> >Graphics,LineBox->Line,FormBox[x1_,x2___]:>StringReplace[x1,"\""- 
> >""]}],g0];
>
> g=g/.NCache[_,x_]:>x;
>
> {pp1,pp2}=(PlotRange/.AbsoluteOptions[g])//Transpose;
>
> g1=DynamicModule[{p1=pp1,p2=pp2,lp={0,0},aspect=1},Column 
> [{LocatorPane[Dynamic[{p1,p2}],Show[{g,Graphics[{Opacity 
> [0.1],Rectangle[Dynamic[p1],Dynamic[p2]]}]},ImageSize- 
> >Small]],EventHandler[Show[g,PlotRange:>Dynamic[Transpose 
> [{p1,p2}]],Frame->True,ImageSize->Full,AspectRatio->Dynamic 
> [aspect]],{"MouseClicked":>(lp=MousePosition["Graphics"])}],Dynamic 
> [lp]
>
> ,Row[{TextCell["AspectRatio fixed:
>
> "],Checkbox[Dynamic[aspect],{Automatic,1}]}]},Center]];
>
> CreateDocument[g1,WindowSize->{Small,All},WindowTitle->"Zoom- 
> DH",WindowElements->{},WindowFrame- 
> >"Palette",BoxForm`ClosingSaveDialog->False];]
>
>
>
> CreatePalette[Button["Zoom",Zoom2D[NotebookRead[SelectedNotebook 
> []]]],WindowTitle->""];
>
> =====================================================
>
> Daniel
>
>
>
> Murray Eisenberg wrote:
>
>> Where is Zoom2D available?
>
>>
>
>> dh wrote:
>
>>> Hello,
>
>>>
>
>>> 4 weeks ago I posted the newest version of Zoom2D adapted to  
>>> Mahematica
>
>>>
>
>>> 6.0.1. Since I received 2 complaints that the new version is not  
>>> working
>
>>>
>
>>> because the command "BoxForm`ClosingSaveDialog -> False]" is  
>>> marked red
>
>>>
>
>>> by Mathematica's editor.
>
>>>
>
>>> Well, I just made several plots (e.g. Plot[Sin[x],{x,0,10}]) and  
>>> tried
>
>>>
>
>>> Zoom2D, this worked without problems. Looking at the code, it is  
>>> true
>
>>>
>
>>> that the above command is flagged red, but this seems rather a  
>>> bug of
>
>>>
>
>>> the editor than of Zoom2D.
>
>>>
>
>>> If somebody had a problem with Zoom2D, I beg that he sends me an  
>>> example
>
>>>
>
>>> that I have a chance to look at it.
>
>>>
>
>>> Daniel
>
>>>
>
>>>
>
>>>
>
>>
>
>
>



  • References:
  • Prev by Date: Re: Creating and installing one's own packages?
  • Next by Date: Re: Two sphers joined by a line and moving on an ellipse! (animation)
  • Previous by thread: Re: Zoom2D
  • Next by thread: Re: Re: Zoom2D - V6 question