Summary

In this chapter, we learned how to save and load the contents of a window using Cocoa’s multiple-document architecture. Saving took some effort because we needed to figure out how to archive the contents of a MathPaper document. After that, loading was relatively easy. We also learned how to mark a window as edited and how to erase that mark after the window’s contents are saved. Finally, as frosting on the cake, we learned that printing was already set up for us as part of the multiple-document architecture.

In the next chapter, we’ll have some fun with a little animation. It’s the last of five chapters that build MathPaper. Then, in Chapter 15, we’ll go into more depth about custom views.

Get Building Cocoa Applications: A Step by Step Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.