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 want to know how can I see only the output when I deploy the Mathematica notebook in Player Pro as in CDF Player?

I have gone through this screencast on How to Encrypt Your Code for Deployment, but I haven't understood it properly.

share|improve this question
    
I'm having a similar problem with CDF player, I can't deploy it –  Igäria Mnagarka Jul 10 '12 at 11:05
    
@GustavoBandeira: For deploying in CDF, you can use CDF Deploy. For eg. CDFDeploy[ToFileName["path", "name of cdf"]] path is where you want the cdf to be deployed. name of cdf is what name do you want to give to cdf which is to be deployed. –  Jennifer Jul 10 '12 at 11:07
    
I know, but my code has something that does not let me deploy it, I'm not sure of what it should be. –  Igäria Mnagarka Jul 10 '12 at 11:09
    
As far as I know, cdf cannot have dynamic import. May be your code has dynamic importing. –  Jennifer Jul 10 '12 at 11:12
    
If it can't have dynamic, what should I use to make dynamic content? - Imagine I want to have an InputField and a Button, I input a value in the InputField and then pressing the button will append this value to a list, and this list is gonna be printed in some plot - Everytime I press the Button, the listplot must be refreshed. - How can it be done? –  Igäria Mnagarka Jul 10 '12 at 11:15
show 4 more comments

4 Answers

Consider two versions of CDF:

Deployed

  • Save as -> cdf (not deployed): you can see literally the source code via hitting shift+ctrl+E (hard to comprehend though ).

Deploy a cdf without showing source code:

  • click the output in your notebook.

  • choose File -> Deploy -> Standalone -> current selection

  • export this cdf to the selected location

You can also, copy the out put and simply paste it into a new CDF document.


You can typically make what you want to do with input work by hardcoding possible selections rather than free input. Make a List[] of options that some selection mechanism will access. Your selection of input just becomes another dynamic element. This should achieve what you want.

Note: you can also access any of Wolfram's computable data within a CDF.

Best if you can post an example of what you have tried. Then responders can give you more specific solutions.

share|improve this answer
add comment

To prevent your code from appearing in the CDF file, simply double-click on the innermost cell bracket of your output cell. This collapses the input cell. Then select File...Deploy...Standalone...[save entire file)]. The resultant CDF file will neither show the input code nor allow it to be seen at all (since the cell bracket will not be available).

share|improve this answer
add comment

In addition to the methods already suggested by others:

If you would like to have a CDF that consists of a single Manipulate you can simply copy the Manipulate box itself (i.e., the output of the Manipulate) to an empty notebook and save that as a CDF. If initialization with external variables is required use the Manipulate option SaveDefinitions->True and/or wrap your Manipulate in a DynamicModule.

share|improve this answer
add comment

If your question is really "How do I remove the input?", then you can evaluate

NotebookPut[DeleteCases[NotebookGet[], Cell[_, "Input", ___], Infinity]]

to create a fresh copy of a notebook with no Input cells in it. Then save as CDF.

share|improve this answer
    
Its working fine when I execute the code for once. But when I I am closing Mathematica, cdf is not working. Why? How can I rectify this –  Jennifer Jul 12 '12 at 5:44
add comment

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.