Chapter 10. Travel Advisor Tutorial
In this chapter you’ll expand your repertoire of Cocoa programming techniques to:
Use forms and table views (beyond the simple introduction in Chapter 9)
Group objects in Interface Builder
Add images to applications
Format and validate fields
Make connections for simple printing
Use collection objects and string objects
Reuse custom objects from other applications
The vehicle for exploring these topics is an application called Travel Advisor. Travel Advisor is a forms-based application used for entering, viewing, and deleting records on countries to which the user travels. This example application will give you another chance to work with design using Model-View-Controller (MVC) and also provides a chance to explore more deeply many of the Cocoa programming techniques to which you’ve been introduced in previous chapters.
Travel Advisor Design
Travel Advisor is much like Currency Converter in its basic design, but the application is considerably more complex. Figure 10.1 shows Travel Advisor’s user interface. To use Travel Advisor, you enter a country name along with travel-related information associated with that country. When you click Add, the name of the country appears in the table of country records. After you’ve entered data on several countries, you can select a particular country from the table and the information on that country appears in the forms. You can save all of your travel information to disk before you quit the application, so no ...
Get Learning Cocoa 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.