• 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: filePath issue?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filePath issue?


  • Subject: Re: filePath issue?
  • From: "Julien Jalon" <email@hidden>
  • Date: Sat, 10 Feb 2007 03:10:15 +0100

You should always use absolute paths.

In general, you get your resources file path using -[NSBundle
pathToResourceXXX] APIs.

There is a special convenient way for images inside your application
Resources folder: -[NSImage imageNamed:]

--
Julien

On 2/9/07, CoreX2 <email@hidden> wrote:
hello everyone, there is a problem about the file path.
I want to generate a NSImage instance with the  method:
- initByReferencingFile:(NSString *) filename;
If I want to use the relative path, for example : I add a .png file
to my project, then How should I use the png file: juse use the
relative path or the absolute path?
It seems that the absolute path is not the adoptable method to solve
the problem. But if to use the relative path, what path should I
refer: the path linking to my project?

Thanks for any help .

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >filePath issue? (From: CoreX2 <email@hidden>)

  • Prev by Date: Re: how to use the "small icon menu" in the main menu bar?
  • Next by Date: Re: how to use the "small icon menu" in the main menu bar?
  • Previous by thread: Re: filePath issue?
  • Next by thread: Crash using mutableSetValueForKeys
  • Index(es):
    • Date
    • Thread