• 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
Fwd: List of AppKit NSSound names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: List of AppKit NSSound names


  • Subject: Fwd: List of AppKit NSSound names
  • From: Ben Kazez <email@hidden>
  • Date: Fri, 28 Oct 2005 07:37:46 -0500

Oops, I'm totally wrong. NSSearchPathForDirectoriesInDomains does not require Tiger; I had that impression because I recently used it to search for NSApplicationSupportDirectory, which does require Tiger.

Ben

Begin forwarded message:

From: Ben Kazez <email@hidden>
Date: October 27, 2005 9:21:26 PM CDT
To: email@hidden, Gregory Weston <email@hidden>
Subject: Re: List of AppKit NSSound names


On Oct 27, 2005, at 8:51 PM, Gregory Weston <email@hidden> wrote:


Sean McBride wrote:



On 2005-10-27 08:16, Ryan Britton said:



From what I've found, there doesn't appear to be a way to query for
a sounds list.  Here's the code I use to build a sound list:

#define SystemLibrary() @"/System/Library/"
#define AllUsersLibrary() @"/Library/"
#define UserLibrary() [NSHomeDirectory()
stringByAppendingPathComponent:@"Library/"]

#define SoundsDirectory(base) [base
stringByAppendingPathComponent:@"Sounds"]




Better than hardcoding those paths is to use APIs like FSFindFolder
() in
Folders.h. That provides protection against Apple renaming the paths.




Possibly even better:

NSArray* libs = NSSearchPathForDirectoriesInDomains
(NSLibraryDirectory, NSUserDomainMask | NSLocalDomainMask |
NSSystemDomainMask, YES);


Note that the NSSearchPathForDirectoriesInDomains function requires Tiger.


Ben
--
Ben Kazez
http://www.benkazez.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: List of AppKit NSSound names (From: Ben Kazez <email@hidden>)

  • Prev by Date: Re: How to find out if horizontal scrollbar in WebView is currently active or not
  • Next by Date: how start default dvd player?
  • Previous by thread: Re: List of AppKit NSSound names
  • Next by thread: newbie menu question
  • Index(es):
    • Date
    • Thread