Aha ok.. Thanks

I think I did it now.

Gus

On 3.12.2008, at 16:08, Benjamin Stiglitz wrote:

NSImage * image = [[NSImage alloc] initByReferencingFile:@"Destroyer.png"];

Your conditional statement is failing because the image can't be located; you need to pass the path to your image relative to the current working
directory; see the documentation:

<http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/Reference/Reference.html#//apple_ref/occ/instm/NSImage/initByReferencingFile: >

If this image is in your resources directory, you can use either
 [NSImage imageNamed:@"Destroyer.png"]
or
[[NSImage alloc] initByReferencingFile:[[NSBundle mainBundle] pathForResource:@"Destroyer" ofType:@"png"]]

-Ben
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/gustavxcodepicora%40gmail.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to