Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 30. Creating Cocoa Applications ... > Example Project: KitchenTimer

30.9. Example Project: KitchenTimer

KitchenTimer is a simple application that will allow text entry of a number, and then count down to zero from that number. We will demonstrate how to use a separate file for the application's controller and let the application delegate be a delegate for NSApplication only. We will also be demonstrating how to use NSTimer, which is Cocoa's answer to the idle handlers used in AppleScript Editor applets.

30.9.1. Creating the Project and Starting the Code

Create a new project in Xcode and name it KitchenTimer. Right-click the Classes folder and choose Add New File. Select AppleScript class and click Next. Name the file Controller.applescript and save.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial