Relative pathnames e.g. when initializing NSImages?
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.