• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Documentation for NSSound.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Documentation for NSSound.


  • Subject: Re: Documentation for NSSound.
  • From: Matt Rollefson <email@hidden>
  • Date: Fri, 7 Dec 2001 22:02:18 -0800

Thanks for the input -- enhancement request filed.

Rollie


On Friday, December 7, 2001, at 11:53 AM, John C. Randolph wrote:

Matt,

One suggestion on the NSSound documentation: in the example "Loading Sounds Using NSOpenPanel", we find:

NSMutableArray *fileTypes = [NSMutableArray arrayWithObject:@"aif"];
[fileTypes addObject:@"aiff"];
[fileTypes addObject:@"wav"];
[fileTypes addObject:@"snd"];

Where I think it should be:

NSArray *fileTypes = [NSSound soundUnfilteredFileTypes];

Since NSSound can tell us all the file types it takes, there's no reason to hard-code them.

For that matter, even if I were to hard-code that array, I would use

NSArray *fileTypes = [NSMutableArray arrayWithObjects:@"aif",@"aiff",@"wav",@"snd", nil];

No need for four lines where one line will do.

-jcr

"Bill Gates is just a white Persian cat and a Monocle away from being the villain in a James Bond flick" - Dennis Miller


References: 
 >Documentation for NSSound. (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: NSBundle question
  • Next by Date: Re: Cocoa Documentation Updated for December Tools Release
  • Previous by thread: Documentation for NSSound.
  • Next by thread: Re: Cocoa Documentation Updated for December Tools Release
  • Index(es):
    • Date
    • Thread