• 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
Re: notification when app is moved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >notification when app is moved (From: Mitchell Livingston <email@hidden>)
 >Re: notification when app is moved (From: Omar Qazi <email@hidden>)
 >Re: notification when app is moved (From: Mitchell Livingston <email@hidden>)
 >Re: notification when app is moved (From: Omar Qazi <email@hidden>)
 >Re: notification when app is moved (From: Mitchell Livingston <email@hidden>)
 >Re: notification when app is moved (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Trouble with first Cocoa lesson
  • Next by Date: Re: Trouble with first Cocoa lesson
  • Previous by thread: Re: notification when app is moved
  • Next by thread: Re: notification when app is moved
  • Index(es):
    • Date
    • Thread