Re: notification when app is moved
Re: notification when app is moved
- Subject: Re: notification when app is moved
- From: Charles Srstka <email@hidden>
- Date: Thu, 17 Jul 2008 20:00:59 -0500
On Jul 17, 2008, at 1:26 PM, Omar Qazi wrote:
Sure. Then just update it every time the Application starts. Or do
something like
// I need to access that one file
if (![[NSFileManager defaultFileManager]fileExistsAtPath:savedPath]) {
newPath = [[NSBundle mainBundle]pathForResource:@"Whatever"
ofType:@"whatever"];
[self savePath:newPath];
}
//Use saved path
Why are you saving your bundle's path across startups? I wouldn't do
that - just get it from NSBundle whenever you need it.
On Jul 17, 2008, at 4:03 PM, Uli Kusterer wrote:
Just be aware that Cocoa itself is kinda stupid about coping with
the current app's bundle being moved (different from Carbon, funnily
enough).
Probably because Carbon is more likely to be using FSRefs internally.
Yeah, I wouldn't move a Cocoa app while it's running.
Charles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden