Summary

In this chapter, we learned a significant amount about Rich Text Format, which helped us format the mathematical output in our MathPaper windows. We also learned more about the NSText and NSTextView classes. In particular, we learned how to exert precise control over the contents of an NSTextView object by using RTF to encode font, size, and justification information into a stream before copying the information into the NSTextView object.

In the next chapter, we’ll see how to use methods built into the NSText class to save the contents of a MathPaper window into a file. We’ll also learn how to implement the opening and printing of MathPaper documents (files). Finally, we’ll learn how to catch the message that Window Manager generates when a user double-clicks a file icon in the Finder and how to open that file in our MathPaper application.

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.