Mathematica; NotebookEvaluate inside CreateDialog

  • Context: Mathematica 
  • Thread starter Thread starter ChristinaJ
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

The forum discussion addresses an issue encountered in Mathematica 8 when using the CreateDialog function to evaluate notebooks via buttons. Users reported the error "Could not process unknown packet '1'" when attempting to execute NotebookEvaluate on specified notebook files. The solution identified was that the problem stemmed from the Button implementation rather than the CreateDialog itself. The resolution was found through community assistance on Mathematica Stack Exchange.

PREREQUISITES
  • Familiarity with Mathematica 8 syntax and functions
  • Understanding of CreateDialog and NotebookEvaluate functionalities
  • Basic knowledge of error handling in Mathematica
  • Experience with user interface elements in Mathematica
NEXT STEPS
  • Explore advanced CreateDialog options in Mathematica
  • Investigate error handling techniques in Mathematica
  • Learn about user interface design in Mathematica
  • Review community solutions for common Mathematica issues on Stack Exchange
USEFUL FOR

Mathematica users, developers creating interactive notebooks, and anyone troubleshooting evaluation issues in Mathematica 8.

ChristinaJ
Gold Member
Messages
34
Reaction score
1
The following creates a button window to select a notebook to run. When a button is pressed Mathematica finds the notebook but cannot evaluate it. The following error occurs
Could not process unknown packet "1"
Code:
CreateDialog[
  DialogNotebook[{Column[{TextCell[
       Row[{Style["I would like to ...", FontWeight -> Bold]}], 
       "Text"], 
      Row[{Button["run 1", 
         NotebookEvaluate[
          "/../file1.nb"]],
        Button["run 2", 
         NotebookEvaluate[
          "/../file2.nb"]],
        Button["run 3", 
         NotebookEvaluate[
          "/../file3.nb"]]}], Button["Done", DialogReturn[]]}]}]];
This occurs under Mathematica 8 on all platforms.

Any help greatly appreciated,
Christina
 
Physics news on Phys.org

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K