Basic NSImage drawing help please! - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Basic NSImage drawing help please! (/thread-1827.html)
Basic NSImage drawing help please! - xenocide - Jan 30, 2009 11:04 AM
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?
Basic NSImage drawing help please! - ThemsAllTook - Jan 30, 2009 11:15 AM
Your first period needs to be a slash. <AppKit/NSImage.h>
Basic NSImage drawing help please! - xenocide - Jan 30, 2009 09:27 PM
Doh. Thanks, I'll try that!
Basic NSImage drawing help please! - xenocide - Feb 1, 2009 08:42 PM
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
Basic NSImage drawing help please! - daveh84 - Feb 2, 2009 08:07 AM
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.
Basic NSImage drawing help please! - TomorrowPlusX - Feb 2, 2009 10:01 AM
You should get a book on Cocoa programming; it looks like you're missing out on some fundamentals here...
Aaron Hillegass' book is excellent.
Basic NSImage drawing help please! - FlamingHairball - Feb 2, 2009 11:01 AM
+1 for Aaron Hillegass' book.