• 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: Problem opening file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem opening file


  • Subject: Re: Problem opening file
  • From: Scott Ribe <email@hidden>
  • Date: Tue, 22 Feb 2011 09:46:27 -0700

On Feb 22, 2011, at 9:14 AM, Sherm Pendley wrote:

>> I imagine I have to deal
>> with application bundle api, but the thing is I can't add any cocoa code to
>> this library, as it needs remain cross-platform.
>
> Does this library allow you to specify the full path to its config
> file, instead of just its name, when you initialize the library? If
> so, you could keep the platform-specific code outside of the library
> itself.
>
> Alternatively, you could use NSBundle methods to find the location of
> your executable, then chdir() to that directory before initializing
> the library.

Also, although I don't know that it really matters other than style & consistency, but next to the executable is not where such a file would normally be put in an app bundle. The "Resources" folder in the bundle is more appropriate--assuming here that you're building a regular bundled app and not just a command-line executable...

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice




_______________________________________________

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: 
 >Problem opening file (From: Carlos Eduardo Mello <email@hidden>)
 >Re: Problem opening file (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: Problem opening file
  • Next by Date: Re: How to detect when an NSTextView has finished being loaded into a window?
  • Previous by thread: Re: Problem opening file
  • Next by thread: Re: Problem opening file
  • Index(es):
    • Date
    • Thread