1
$\begingroup$

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?

$\endgroup$
12
  • $\begingroup$ Have you tried multiple arguments for Scaled? -- Scaled[{x,y}]? $\endgroup$
    – kale
    Commented Aug 25, 2012 at 16:19
  • $\begingroup$ @kale: Yes, I have tried that too. Not working. $\endgroup$
    – Jennifer
    Commented Aug 25, 2012 at 16:27
  • 1
    $\begingroup$ 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 $\endgroup$ Commented Aug 25, 2012 at 17:16
  • $\begingroup$ @SjoerdC.deVries: Yes, I have edited. $\endgroup$
    – Jennifer
    Commented Aug 25, 2012 at 17:26
  • 1
    $\begingroup$ 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. $\endgroup$ Commented Aug 25, 2012 at 18:39

1 Answer 1

1
$\begingroup$

(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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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