Bundle problems
Bundle problems
- Subject: Bundle problems
- From: "Michael P. Rogers" <email@hidden>
- Date: Fri, 8 Jun 2001 19:42:10 -0500
I am trying to follow the rules and load images from a bundle, as
opposed to a separate directory. Unfortunately, I keep getting nil
back from
imageFiles = [NSBundle pathsForResourcesOfType:@"jpg"
inDirectory:@"Images"];
I've tried variations on a theme -- jpeg, .jpeg, .jpg, and Images/,
to no avail.
My files, jpegs with the extension .jpeg, are stored in:
LayeringExperiment.app/Contents/Resources/Images
I also have them open in the Resources folder, but still can't find them.
FWIW, when I use nil for the inDirectory parameter, the program bails
out with a signal 10 (SIGBUS) error message -- and when I step
through, I get an "Program received signal: EXC_BAD_ACCESS" error
instead. My permissions look OK.
For now I've resorted to using NSFileManager's
directoryContentsAtPath: method. It works pointing to a separate
directory, but if I give it the path to the Images directory in my
bundle, it fails, too.
Any suggestions would be appreciated.
TIA,
Michael
--
---------------------------------
Dr. Michael Rogers
e-mail: email@hidden
Phone: 217-424-6327
For information about Computer Science at Millikin University, visit
http://math.millikin.edu
For information about astronomy, check out
http://twincityamateurastronomers.org