Documentation for NSSound.
Documentation for NSSound.
- Subject: Documentation for NSSound.
- From: "John C. Randolph" <email@hidden>
- Date: Fri, 7 Dec 2001 11:53:58 -0800
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