I have a question about creating a docked cell that will let me choose files.
This is just as much a "design" question as a Mathematica question.
I'm a math teacher and I want to bundle a bunch of Mathematica lesson content into a unit.
I have a whole bunch of files that make up a unit. We'll call them simply Lesson1.cdf, Lesson2.cdf, Lesson3.cdf etc. We'll say there are 10 of them.
I wanted to build the unit in smaller pieces , since it seems logical not to have a huge amount of info in one file. So, create in pieces.
I can see how to use ActionMenu to do this... at least it's one way, not saying it's the best way!!
b1 = ActionMenu["Open a lesson",
{"Lesson 1" :>
NotebookOpen[FileNameJoin[{NotebookDirectory[], "lesson1.cdf"}]],
"Lesson 2" :>
NotebookOpen[
FileNameJoin[{NotebookDirectory[], "lesson2.cdf"}]]},
Appearance -> "PopupMenu"
]
It works...
I then create a docked cell in the Notebook...
SetOptions[SelectedNotebook[],
DockedCells -> Cell[BoxData[ToBoxes[b1]], "DockedCell"]];
This too works... so far so good!
So , sadly, that's as far as my knowledge will take me.
I tried using hyperlinks to open the lesson notebooks from a main document, but it seemed really cluttered , having more than one notebook open on screen. This method seems potentially better, but can I have it close the "calling" notebook when it opens the selected lesson?
Would there be an easy way to write this docked cell to all the other lessons? (Yes, I think I could do that by just getting a list of lesson files and setting their options for docked cells)
Finally, this way of opening the notebooks generates the "unsafe" content warning. That will be bad since then every lesson notebook will have this issue.
Way over my depth here, but hoping someone can give some "design" advice for packaging up a bunch of notebooks into a nice unit, and being able to get from one to another easily.
My students do not have Mathematica and are using CDFPlayer to view my lessons.
It's interesting that bundling a "NotebookOpen" inside a Button does NOT trigger the warning, which is a big thing. So, buttons aren't as elegant, but they do work and allow students to move between lessons with no issues.
But I know that can't be right... I've probably managed to add that path to my TrustedDirectories or something... it's a real nuisance not to be able to do this in a straightforward way...