FROM : Sean McBride
DATE : Mon Dec 27 20:03:24 2004
Shaun Wexler (<email_removed>) on Mon, Dec 27, 2004 1:36 PM said:
>I think you have to hand-enter the non-localized string, such as:
>
>- (NSArray *)applicationSupportPaths
>{
> NSArray *searchPaths =
>NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
>NSUserDomainMask + NSLocalDomainMask, YES);
> NSMutableArray *applicationSupportPaths = [NSMutableArray
>arrayWithCapacity:[searchPaths count]];
> NSString *executableName = [[[NSBundle mainBundle] executablePath]
>lastPathComponent];
> NSString *pathComponent = [NSString stringWithFormat:@"Application
>Support/SKW Development/%@", executableName];
Hard coding paths is very bad. "Application Support" may change names in
the future. Using the FSFindFolder API is best and safest. See:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
LowLevelFileMgmt/Tasks/LocatingDirectories.html>
--
"First they ignore you, then they attack you, then you win."
DATE : Mon Dec 27 20:03:24 2004
Shaun Wexler (<email_removed>) on Mon, Dec 27, 2004 1:36 PM said:
>I think you have to hand-enter the non-localized string, such as:
>
>- (NSArray *)applicationSupportPaths
>{
> NSArray *searchPaths =
>NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
>NSUserDomainMask + NSLocalDomainMask, YES);
> NSMutableArray *applicationSupportPaths = [NSMutableArray
>arrayWithCapacity:[searchPaths count]];
> NSString *executableName = [[[NSBundle mainBundle] executablePath]
>lastPathComponent];
> NSString *pathComponent = [NSString stringWithFormat:@"Application
>Support/SKW Development/%@", executableName];
Hard coding paths is very bad. "Application Support" may change names in
the future. Using the FSFindFolder API is best and safest. See:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
LowLevelFileMgmt/Tasks/LocatingDirectories.html>
--
"First they ignore you, then they attack you, then you win."
| Related mails | Author | Date |
|---|---|---|
| Georg Tuparev | Dec 27, 19:17 | |
| Shaun Wexler | Dec 27, 19:36 | |
| Bob Ippolito | Dec 27, 19:39 | |
| Sean McBride | Dec 27, 20:03 | |
| Georg Tuparev | Dec 27, 20:42 | |
| Sean McBride | Dec 27, 21:35 | |
| Rosyna | Dec 28, 00:28 | |
| John Stiles | Dec 28, 00:41 | |
| Rosyna | Dec 28, 00:46 | |
| BK | Dec 28, 01:49 | |
| John Stiles | Dec 28, 01:57 | |
| Stephan Burlot | Dec 28, 11:11 | |
| Georg Tuparev | Dec 28, 11:51 | |
| Stephan Burlot | Dec 28, 12:50 | |
| M. Uli Kusterer | Dec 28, 15:00 | |
| Stephan Burlot | Dec 28, 15:25 | |
| Rosyna | Dec 28, 15:38 | |
| M. Uli Kusterer | Dec 28, 15:45 |






Cocoa mail archive

