02.04.2013 Views

QuickTime Kit Programming Guide - filibeto.org

QuickTime Kit Programming Guide - filibeto.org

QuickTime Kit Programming Guide - filibeto.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C H A P T E R 3<br />

Extending the QT<strong>Kit</strong>Player Application<br />

■ Xcode 2.0 or later and Interface Builder 2.5 or later. Note that you can use Xcode 1.1 or Xcode 1.5<br />

to build your project, but to take full advantage of the new programming and navigational features<br />

available, such as class model visualization, you’ll want to use Xcode 2.0.<br />

■ The <strong>QuickTime</strong> <strong>Kit</strong> framework, which is in the Mac OS X /System/Library/Frameworks directory<br />

as QT<strong>Kit</strong>.framework<br />

■ The new <strong>QuickTime</strong> palette, which resides in the /Developer/Extras/Palettes directory as<br />

QT<strong>Kit</strong>.palette. If you are running Mac OS X v10.4, the palette is installed automatically. If you<br />

are running Mac OS X v10.3, you will have to install it manually into the /Developer/Palettes<br />

directory, so that it appears in the Interface Builder palettes toolbar when you start up Interface<br />

Builder.<br />

■ <strong>QuickTime</strong> Player version 7<br />

Note: To create the QT<strong>Kit</strong>Player project, you can either develop on Mac OS X v10.4 or Mac OSX v10.3.<br />

If you’re using Xcode 2.0 or later as your IDE, you’ll want to develop your project on Mac OSX 10.4.<br />

Now that you’ve verified you have all these items, let’s get cooking.<br />

Getting Started<br />

You’ll want to set aside the QT<strong>Kit</strong>Player application you built following the steps in the previous<br />

chapter and start fresh with a new Xcode project.<br />

There are a number of reasons for this, but suffice to say, you’ll find it easier to extend your media<br />

player application by starting from scratch. You’ll still be using the new QT<strong>Kit</strong> palette to drag a<br />

QTMovieView object into a window in Interface Builder. The steps you take beyond that will<br />

nonetheless be different from those described in the previous chapter.<br />

Note again that the QT<strong>Kit</strong> palette resides in the /Developer/Extras/Palettes directory. To access<br />

the palette, you can either double-click its icon to launch it in Interface Builder, or drag the palette<br />

into the /Developer/Palettes directory, in which case it will appear among the palettes in the<br />

toolbar shown in Figure 3-6 (page 35) when Interface Builder starts up.<br />

To create the project, follow these steps:<br />

1. Launch Xcode and choose File > New Project.<br />

2. When the new project window appears, select Cocoa Document-based Application. Click Next.<br />

3. Name the project QT<strong>Kit</strong>Player and place it in the directory of your choice. Note that you’re<br />

naming the project the same as the project you built in the previous chapter, so you should place<br />

it in another directory.<br />

4. Next, you need to add the <strong>QuickTime</strong> <strong>Kit</strong> framework to your QT<strong>Kit</strong>Player project. Choose Project<br />

> Add to Project.<br />

5. The QT<strong>Kit</strong> framework resides in the System/Library/Frameworks/QT<strong>Kit</strong>.framework directory.<br />

Select the framework, and click Add to add it to your QT<strong>Kit</strong>Player project.<br />

6. In the Add To Targets sheet, click the Add button.<br />

Creating the Extended QT<strong>Kit</strong>Player Project 33<br />

2005-11-09 | © 2004, 2005 Apple Computer, Inc. All Rights Reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!