On Jul 16, 2008, at 6:08 PM, Mitchell Livingston wrote:

I have code that must know where a folder inside the Resources folder of the application is. This location must be updated whenever the app is moved to another location. Is there some sort of callback I can register to receive for this?

Huh? Where a folder inside the resources folder of an application is? I'm going to assume you mean the full path of something inside of an Application bundle.

You don't need to get a notification when the app is moved. Instead, I would recommend using NSBundle's pathForResource: ofType: in combination with NSWorkspace's fullPathForApplication:. So whenever you needed the path of that folder, you could do something like this:


NSString *pathToApp = [[NSWorkspace sharedWorkspace]fullPathForApplication:@"Whatever Application"];
NSBundle *appBundle = [[NSBundle alloc]initWithPath:pathToApp];
NSString *resourcePath = [appBundle pathForResource:@"WhateverResource" ofType:@"Whatever Type"];

Omar Qazi
Hello, Galaxy!
1.310.294.1593

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to