Basic NSImage drawing help please!
Hi, I am trying to figure out how to to draw an image to a view.
On Apple's doucmentation I found "drawAtPoint:fromRect:operation:fraction:", and and it says this is declared in NSImage.h. I added "AppKit.framework" to my project classes, but whenever I
in Game1.m, I get a build error: "file not found :/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE" and beneath that: "Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ggc-4.0 failed with exit code 1"
What am I doing wrong?
On Apple's doucmentation I found "drawAtPoint:fromRect:operation:fraction:", and and it says this is declared in NSImage.h. I added "AppKit.framework" to my project classes, but whenever I
Code:
#import <AppKit.NSImage.h>in Game1.m, I get a build error: "file not found :/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE" and beneath that: "Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ggc-4.0 failed with exit code 1"
What am I doing wrong?
Your first period needs to be a slash. <AppKit/NSImage.h>
Doh. Thanks, I'll try that!
I added AppKit.framework to my Classes folder and stilll got that error. I tried draggind NSImage.h out of the AppKit.framework/Headers sub-folder and into my Classes folder, then used "#import "NSImage.h" and still get the error. Any ideas? Thanks
As far as I know, NSImage is automatically included with Cocoa.h (forcefully imported at the top of all Cocoa source files) and need not be imported. I suppose you have already tried omitting the include, though.
You should get a book on Cocoa programming; it looks like you're missing out on some fundamentals here...
Aaron Hillegass' book is excellent.
http://www.amazon.com/s/ref=nb_ss_gw_1_9...=aaron+hil
Aaron Hillegass' book is excellent.
http://www.amazon.com/s/ref=nb_ss_gw_1_9...=aaron+hil
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| NSImage and PNG's | bmantzey | 3 | 4,382 |
Nov 29, 2008 07:01 PM Last Post: arekkusu |
|
| NSImage PDF -> JPG | unknown | 3 | 3,369 |
Oct 23, 2005 08:36 PM Last Post: PowerMacX |
|
| How to get resolution of an NSImage or NSBitmapImageRep? | aegidian | 4 | 4,722 |
Oct 18, 2005 02:39 AM Last Post: aegidian |
|
| Help with NSImage and NSString... | Joseph Duchesne | 2 | 4,130 |
Sep 30, 2005 02:21 PM Last Post: unknown |
|
| NSImage -> Jigsaw peices | unknown | 5 | 3,344 |
Sep 29, 2005 07:00 AM Last Post: unknown |
|

