Mathematica; NotebookEvaluate inside CreateDialog

  • Context: Mathematica 
  • Thread starter Thread starter ChristinaJ
  • Start date Start date
  • Tags Tags
    Mathematica
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
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