Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have two questions related to this simple code:

CDFDeploy[SystemDialogInput["FileSave"], 
  Panel[Row[{Button[Text[Style["sav", FontSize -> Scaled[.2]]],ImageSize -> Scaled[.2]], 
      Button[Text[Style["save", FontSize -> Scaled[.2]]],ImageSize -> Scaled[.2]]}],
      ImageSize -> Scaled[2]], WindowSize -> Scaled[2]]            
  1. Sometimes, I am getting Internal Self-Test Error. Why?

  2. I am able to scale Button size, Fontsize and Panelsize in the Horizontal direction but not in the vertical direction. How to do this?

share|improve this question
    
Have you tried multiple arguments for Scaled? -- Scaled[{x,y}]? –  kale Aug 25 '12 at 16:19
    
@kale: Yes, I have tried that too. Not working. –  Jennifer Aug 25 '12 at 16:27
1  
This doesn't seem to be related to deployment to CDF. I get the same error when I cut away the deploy stuff. It is intermittent. The code number is NoteFont2-c-1883 –  Sjoerd C. de Vries Aug 25 '12 at 17:16
    
@SjoerdC.deVries: Yes, I have edited. –  Jennifer Aug 25 '12 at 17:26
1  
The error seems to be related to the use of Scaled too. Remove it from the ImageSize options and the error is gone. Can you live with absolute quantities? ImageSize -> {100, 200} just works. –  Sjoerd C. de Vries Aug 25 '12 at 18:39

1 Answer 1

(Based on Sjoerd's comments)

It is reproducible using the Panel part only. You need a new kernel and a new frontend to get this message (so a complete restart of Mathematica). The complete message is:

INTERNAL SELF-TEST ERROR: NoteFont2|c|1883 Click here to find out if this problem is known, and to help improve Mathematica by reporting it to Wolfram Research.

I clicked on the link and reported the problem.

The error seems to be related to the use of Scaled. The Scaled manual page states

Scaled can be used to specify scaled coordinates in any two- or three-dimensional graphics primitive.

You can use Scaled to represent objects that occupy a fixed region in a plot, independent of the specific range of coordinates in the plot.

So, you can't use Scaled everywhere. Remove Scaled from the ImageSize options and the error is gone. Can you live with absolute quantities? ImageSize -> {100, 200} just works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.