Re: Documentation for NSSound.
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