Chapter 20. Using Built-In Dialog Boxes

Apple provides plenty of prewritten and tested code you can reuse from the Cocoa framework. Besides letting you create a program faster, prewritten code also ensures that your program looks and behaves like a typical Mac program. One of the common elements of every Mac program are dialog boxes, which are windows that pop up and allow the user to print, open, or save a file. Rather than force you to create these common user interface elements yourself, Apple provides you with built-in dialog boxes that you can plug into your own program.

One common built-in dialog box is an alert panel that pops up on the screen to alert the user to something, such as confirming that the computer is about to delete a file ...

Get Mac Programming for Absolute Beginners 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.