Summary
We began this chapter by adding the Evaluator back end we created in
the previous chapter to the MathPaper project. Then we created a new
subclass of NSWindowController, called PaperController, where we put
most of our “controlling”
code — the code that ties our lex- and
yacc-built back end together with the
Cocoa-supplied document front end. MathPaper’s parts
(Evaluator, document architecture, PaperController) fit the
model-view-controller paradigm nicely. Along the way, we discovered a
few issues with our program and learned a bit about Unix processes
and some powerful classes (such as NSTextView) in order to take care
of those program issues.
We can still improve MathPaper considerably. For example, the text output in the windows is plain, and we haven’t done anything about file operations such as printing, saving, opening, and so on. In the coming chapters, we’ll start working on solving these shortcomings.
Another important thing missing from the MathPaper application is the ability to save and load files. We’ll learn how to do that in Chapter 13.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access