Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Re: Zoom2D - V6 question


Hi Syd,
BoxForm`ClosingSaveDialog->False is not actually necessary. Why it does 
not give an error on my machine with Mathematica version 6.0.1.0 I can not
tell. 
Can you try to remove this command and see if it works. At least it 
works on my machine. If we succeed, I will repost the code the command 
removed.
Daniel

Syd Geraghty wrote:
> 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
>>
>>>>
>>
>>>>
>>
>>>>
>>
>>>
>>
>>
>>
>
>
>

-- 

Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh at metrohm.com>
Internet:<http://www.metrohm.ch>



  • References:
  • Prev by Date: Re: NSolve keeps on running forever
  • Next by Date: Problem with supplying custom tick marks
  • Previous by thread: Re: Re: Zoom2D - V6 question
  • Next by thread: eigenvectors is taking lot of time