2
$\begingroup$

Unfortunately people use different Mathematica and CDF versions and the default setting of "InsufficientVersionWarning" in MessageOptions is True both in Mathematica and the CDF Player (which is quite annoying since there always seems to be a time lag of CDF Player releases w.r.t. to Mathematica releases). How can one easily toggle this through a CDF?

$\endgroup$
1
$\begingroup$

This simple code generates a CDF which one has to open from within the desired Mathematica or CDF Player version. Then clicking the checkbox will change the corresponding init.m file in the $PreferencesDirectory/FrontEnd folder.

CDFDeploy["ChangeInsufficentVersionWarning.cdf", #, 
   Method -> "Standalone", "Target" -> "Player"] &@
 DynamicModule[{bool = 
    "InsufficientVersionWarning" /. (MessageOptions /. 
       Options[$FrontEnd, MessageOptions])},
      Dynamic[Style[#, "ShowStringCharacters" -> False] &@Column[{
          Row[{"CDF or Mathematica version: ", 
            MathLink`CallFrontEnd@FrontEnd`Value["$NotebookLicenseType"], 
            " ", $VersionNumber
        }],

      Row[{"InsufficientVersionWarning is currently ", 
        Style[bool, Bold]}],
      Row[{
        "Change: " , Checkbox[Dynamic[bool,
          (bool = #;
            SetOptions[$FrontEnd, MessageOptions -> 

              Append[MessageOptions /. 
                 Options[$FrontEnd, 
                  MessageOptions] /. 
               ("InsufficientVersionWarning" -> _) :> Sequence[],
               ("InsufficientVersionWarning" -> bool)]
             ]) &

          ], Appearance -> Large]}]
      }]], BaseStyle -> "Section"]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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