• 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: Mitchell Livingston <email@hidden>
  • Date: Wed, 16 Jul 2008 23:28:43 -0400

I need the full path, yes. I know I can get it using NSBundle. But if the app is moved, the string that was previously returned from the call is no longer valid. I need to pass the location to a c library and reset the location in this library when the application is movedhttp://www.me.com/my/mail/en/images/spacer.gif, so I need a way to know when the app is moved.

On Wednesday, July 16, 2008, at 10:34PM, "Omar Qazi" <email@hidden> wrote:
>
>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
>
>
>
_______________________________________________

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

  • Follow-Ups:
    • Re: notification when app is moved
      • From: Omar Qazi <email@hidden>
References: 
 >notification when app is moved (From: Mitchell Livingston <email@hidden>)
 >Re: notification when app is moved (From: Omar Qazi <email@hidden>)

  • Prev by Date: Re: Getting the keyEquivalent as a string
  • Next by Date: Chapter 6 Challenge Help!
  • Previous by thread: Re: notification when app is moved
  • Next by thread: Re: notification when app is moved
  • Index(es):
    • Date
    • Thread