[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUstep Makefiles (resource specific)
From: |
Sašo Kiselkov |
Subject: |
Re: GNUstep Makefiles (resource specific) |
Date: |
Thu, 06 Oct 2005 08:56:04 +0200 |
User-agent: |
Internet Messaging Program (IMP) 3.2.5 |
Quoting Nicola Pero <nicola@brainstorm.co.uk>:
> image = [NSImage imageNamed: @"myIcon"];
Percy, isn't your program by any chance a "tool" (I deduct this from you
mentioning you're utilising SDL, so I guess you're using only Foundation
(gnustep-base))? Because then you won't have an NSImage class in the program
(since it is part of the AppKit). Therefore you should rather use something
like this:
NSString * imageFilename = [[NSBundle mainBundle]
pathForResource: @"MyImage" ofType: @"png"];
or if you want all the images in your program:
NSArray * allImageFilenames = [[NSBundle mainBundle]
pathsForResourcesOfType: @"png" inDirectory: nil];
or even better, have a look at the NSBundle class' -pathForResource... methods
and I'm sure you'll find something that fits your needs.
--
Saso