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

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 3<br />

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

}<br />

- (IBAction)doLoop:(id)sender<br />

{<br />

// toggle looping<br />

[mMovie setAttribute:[NSNumber numberWithBool:([sender state] == NSOffState)]<br />

forKey:QTMovieLoopsAttribute];<br />

}<br />

- (IBAction)doLoopPalindrome:(id)sender<br />

{<br />

// toggle palindrome looping<br />

[mMovie setAttribute:[NSNumber numberWithBool:([sender state] == NSOffState)]<br />

forKey:QTMovieLoopsBackAndForthAttribute];<br />

}<br />

- (IBAction)doClone:(id)sender<br />

{<br />

MovieDocument *movieDocument;<br />

// init<br />

movieDocument = [MovieDocument movieDocumentWithMovie:[[mMovie copy]<br />

autorelease]];<br />

// set up the document<br />

if (movieDocument)<br />

{<br />

// add the document<br />

[[NSDocumentController sharedDocumentController]<br />

addDocument:movieDocument];<br />

}<br />

@end<br />

}<br />

// set up the document<br />

[movieDocument makeWindowControllers];<br />

[movieDocument showWindows];<br />

21. Save your MovieDocument.m file (Command-S).<br />

This completes the steps for adding code to your MovieDocument.m implementation file. There is<br />

only one more step, described in the next section, before you can run and build your QT<strong>Kit</strong>Player<br />

application.<br />

Modifying the Info.plist File<br />

The is the last step to complete before you can build and run your QT<strong>Kit</strong>Player application.<br />

1. In your Xcode project, double-click the Info.plist file to open it.<br />

2. Delete the existing contents of the Info.plist file.<br />

3. Replace the contents of the file with the following:<br />

56 Modifying the Info.plist File<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!