QuickTime Kit Programming Guide - filibeto.org
QuickTime Kit Programming Guide - filibeto.org
QuickTime Kit Programming Guide - filibeto.org
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
C H A P T E R 4<br />
Adding New Capabilities to the QT<strong>Kit</strong>Player Application<br />
20. Wire up the disclosure button to the toggleDrawer action. Click the disclosure button in the<br />
MovieDocument window. Press the Control key, then drag the wire to the File Owner’s icon. In<br />
the Connections pane of the Info window for NSButton, click the Target/Action pane. Select the<br />
toggleDrawer action and click the Connect button, as shown in Figure 4-12.<br />
Figure 4-12 Wiring up the toggle drawer target and action in the MovieDocument.nib<br />
This completes the steps you need to follow in order to construct the Cocoa drawer and hook up the<br />
outlets and actions in Interface Builder.<br />
Adding Code To Your QT<strong>Kit</strong>Player Project<br />
In this section, you’ll add less than one hundred lines of code to your QT<strong>Kit</strong>Player project by modifying<br />
your MovieDocument.h and MovieDocument.m class files.<br />
Adding Code To The Movie Document Class<br />
In this next sequence of steps, you’ll be adding a small amount of code to your MovieDocument.h<br />
class interface file. You want to declare the instance variables that you have specified as your outlets<br />
and target actions in Interface Builder. You also want to define in code the methods that will enable<br />
you to set these variables.<br />
To begin, open the MovieDocument.h declaration file in your Xcode project. Follow these steps to<br />
add to your existing code in the file:<br />
72 Adding Code To Your QT<strong>Kit</strong>Player Project<br />
2005-11-09 | © 2004, 2005 Apple Computer, Inc. All Rights Reserved.