• 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: Background helper tool location change problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background helper tool location change problem


  • Subject: Re: Background helper tool location change problem
  • From: Ryan Britton <email@hidden>
  • Date: Wed, 14 Dec 2005 12:33:06 -0800

Try launchApplication: in NSWorkspace. All you have to provide is the name of the application and it finds it.

http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSWorkspace.html#//apple_ref/occ/ instm/NSWorkspace/launchApplication:


On Dec 14, 2005, at 11:22 AM, Jerry Brace wrote:

My main application has a helper app in it's resources directory. When the main application is closed I have this helper app running in the background and is used to launch the main application on a scheduled date/time.

The main application launches the helper by getting the path from the name of the resource (the helper app in the resources folder). The problem is - if the application is moved to another location while it is running the helper doesn't seem to know this and when the helper tries to launch the main application (by getting the parent path of the helper) it does not work - I believe it still thinks it is running in the original location.

I know that in a normal case no one would be moving the app around - but I'd like to correct this.
Example: someone could mount the application image - run the app - turn on the helper and then move the app to the applications folder - this would case the problem.

So basically I need to know the correct way to launch a helper app, and have it be able to reference the main application when needed to open it. When the helper is enabled it is also set as a login item for the current user.

Any help would be great! I've been working on this for quite some time.

Jerry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Background helper tool location change problem (From: Jerry Brace <email@hidden>)

  • Prev by Date: Re: WWDC 2005 DVDs [OT]
  • Next by Date: Re: install_name_tool & glib
  • Previous by thread: Re: Background helper tool location change problem
  • Next by thread: Options for graphic drawing?
  • Index(es):
    • Date
    • Thread