O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

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

GUI Chatter Client

chatterclient from the networking chapter works fine if you like living on the command line. Most Mac users (understandably) want to use GUI programs. CFChatterClient is a GUI version of the chatterclient. It uses CFRunLoop and CFSocket to communicate across the network without blocking the application runloop.

In Xcode, create a new Cocoa Application project called CFChatterClient. Edit MainMenu.xib and lay out the UI as shown in Figure 15.2.

Figure 15.2  CFChatterClient user interface

CFChatterClient user interface

Back in Xcode, edit CFChatterClientAppDelegate. Edit the header to look like Example 15.1 and the body like Example 15.2.

Example 15.1. CFChatterClientAppDelegate.h ...

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