Fred Kiefer wrote:
Nicolas SANCHEZ wrote:
I've a picture in my app directory (included in GNUmakefile), when I exec my prog in the src dir, the picture is loaded, but after doing a make install and executing the prog anywhere the picture is not loaded.

Is it necessary to tell the complete path when loading the picture ?

Could you just provide the GNUmakefile and the line of code where you load the picture? The solution is probably as easy as to put the picture  into the XXX_RESOURCE_FILES in the GNUmakefile, but how could I tell, if you aren't doing this already?


.

in the GNUmakefile:

CameraTransfer_RESOURCE_FILES= \
CameraTransferInfo.plist \
CameraTransfer.tiff \
CameraTransfer_header.tiff


in the source code:

NSImage *img = [[NSImage alloc] initWithContentsOfFile: @"CameraTransfer_header.tiff"]];

but somebody helps me to find this (which works):

NSImage *img = [[NSImage alloc] initWithContentsOfFile: [[NSBundle mainBundle] pathForImageResource: @"CameraTransfer_header.tiff"]];

But I think that the first code should works also, shouldn't it ?
_______________________________________________
Help-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-gnustep

Reply via email to