Where is the debug folder in Xcode 4?

Joined
Dec 8, 2009
Messages
453
Reaction score
10
Points
18
Location
The same as Sheldon Cooper - East Texas
Your Mac's Specs
iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
With the frequent and major changes that Apple makes to Xcode, I don't see how any code shop manages to stay on schedule.

Anyway, I am finally getting back into Xcode and, of course, the current version is 4. In version 3, you put any file you wanted to access into the Debug folder, which does not exist now. So, where does external data belong?

Here are two snippits that just load a jpg and dump it into a NSImageView. Both are supposed to be working examples.

//This has a path hard coded and works.
NSString *inFilePath = @"/Users/home/Programming/test/picture.jpeg";
NSImage *testImage = [[[NSImage alloc] initWithContentsOfFile:inFilePath] autorelease];
[imageView setImage:testImage];

//This is an example on several tutorial web sites and doesn't work
NSImage *testImage = [NSImage imageNamed:mad:"picture.jpeg"];
[imageView setImage: testImage ];

In the second example, no matter where I put the image, the code doesn't find it. Normally, I would assume that the code was in error, but as I said, I have found this example on numerous web sites.

Thanks, any.
 
OP
cptkrf
Joined
Dec 8, 2009
Messages
453
Reaction score
10
Points
18
Location
The same as Sheldon Cooper - East Texas
Your Mac's Specs
iMac 2014 i5 5k 32gb 1tb fusion, second TB display, 2014 MBA
Never mind. It was a corrupted load of Xcode. As I was working on the above problem, it crashed big time and took the machine with it. Had to use the thumb on the power button for five seconds routine to get started again. Then XCode would hang the machine when the suite was restarted. Couldn't even use a terminal session to kill the process.

Dumped it, redownloaded, installed and my programming problem was fixed and the examples worked as advertised.
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
The second code works fine for me. In your project I'd right click on the image and choose "Show in Finder" to see if the image is actually in your project folder.

EDIT: I see you fixed it well I was experimenting. Good to here.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top