• 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: Plugins work in PB, but not in standalone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plugins work in PB, but not in standalone


  • Subject: Re: Plugins work in PB, but not in standalone
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Thu, 30 Oct 2003 14:06:04 +0100

At 7:02 Uhr -0700 29.10.2003, Chaz McGarvey wrote:
Something similar happened to me, only they weren't plugins they were just images in the same directory as the executable. I thought that I could just get the images using a relative path (just the file name), but like you said, it only worked when the app was launched by Project Builder. Obviously I wouldn't have delivered the app like this, but it would have been convenient for testing purposes to do it like this. I still don't know why it works like this.

The reason is that PB sets up the "current directory" (what you change using "cd" in the Terminal, for example) different than Finder does. So, either use the appropriate Unix API (chdir(), or some name like that) to set up the current working directory at application launch time, or use absolute paths.

I'd suggest the latter, since it insulates you from some Unix code you may later decide to incorporate into your app, which may change the directory again. Use NSBundle methods to get the path to your application or a folder inside its bundle.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Plugins work in PB, but not in standalone (From: Kevin Wojniak <email@hidden>)
 >Re: Plugins work in PB, but not in standalone (From: Chaz McGarvey <email@hidden>)

  • Prev by Date: Re: Problem cancelling lengthy task in secondary thread
  • Next by Date: Re: Animating control position
  • Previous by thread: Re: Plugins work in PB, but not in standalone
  • Next by thread: Re: Plugins work in PB, but not in standalone
  • Index(es):
    • Date
    • Thread