O'Reilly logo

Beginning Mac OS® X Programming by Drew McCormack, Michael Trent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.6. Exercises

  1. Modify the Carbon Email Formatter application to update its result text view whenever you type in a text field. No nib file changes should be necessary. You will need to register a window event handler for a keyboard event type to receive keyboard events. Once you do that, your event handler will receive these events before the Carbon framework has the chance to interpret them. You must use the CallNextEventHandler function to pass the event back to Carbon so text fields will actually update, and then call ComputeResult once CallNextEventHandler returns.

  2. Change Slide Master's Export function to write the name of each image into the lower-right corner of the QuickTime movie. Remember you are working with a QuickDraw port at this point (in the form of a GWorldPtr) and the NSString drawing techniques you learned in Chapter 8 will not directly help you. Instead, use the MLTE function TXNDrawCFStringTextBox to draw the filename.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required