• 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
Relative pathnames e.g. when initializing NSImages?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Relative pathnames e.g. when initializing NSImages?


  • Subject: Relative pathnames e.g. when initializing NSImages?
  • From: Nathan Groh <email@hidden>
  • Date: Sat, 11 May 2002 07:14:54 -0700

When using NSImage's initWithContentsOfFile: method, I'm forced to use an absolute pathname. A standard Unix relative pathname invariably fails. Is there some special Darwin voodoo regarding relative paths that I'm in the dark about? I've tried both a relative path from the application, e.g. @"Graphics/image.tiff" where Graphics is the folder containing the app's images, and a relative path from the user's home directory e.g. @"~/Application/Graphics/image.tiff". Both paths fail to initialize the NSImage successfully, and I'm forced to use a path like @"/Users/theuser/Application/Graphics/image.tiff". Obviously I'm missing something. Can someone shed some light on the situation for me? Fiat lux. : )

Thanks in advance,
--Nathan
_______________________________________________
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.

  • Follow-Ups:
    • Re: Relative pathnames e.g. when initializing NSImages?
      • From: Andrew Pinski <email@hidden>
    • Re: Relative pathnames e.g. when initializing NSImages?
      • From: email@hidden
  • Prev by Date: Re: DO proxy question
  • Next by Date: Re: Relative pathnames e.g. when initializing NSImages?
  • Previous by thread: Re: Little question on AuthorizationExecuteWithPrivileges
  • Next by thread: Re: Relative pathnames e.g. when initializing NSImages?
  • Index(es):
    • Date
    • Thread