[geeks] Cocoa

Joshua Boyd jdboyd at jdboyd.net
Fri Oct 7 12:44:27 CDT 2005


Does anyone know any particularly good guides to getting started (or
maybe I really want intermediate) with Cocoa?  Dead tree format is fine.

I started off fine with basic forms and such using tutorials from Apple
and other net sites.  But now I trying to do more complicated stuff with
views (NSView and NSOpenGLView specifically) and am having trouble
getting keystrokes or mouse movements to work.  I don't want to have to
have my program sit there polling for the mouse position like I see
examples of in some games. 

I found a hint at what I wanted to make the mouseMove events work in
Apple's documents, which said to send setAcceptsMouseMovedEvents: to the
NSView's NSWindow.  However, sticking [[self window]
setAcceptsMouseMovedEvents: YES]; in one of the initWith methods (one
that already had a bunch of set up in it), then implementing the
mouseMove method didn't do the trick.  Also, subclassing NSWindow and
sticking [self setAcceptsMouseMovedEvents: YES]; in the new class's
initWithContentRect:styleMask:backing:defer: method also didn't do the
trick.

So, to bring this back to the first question, I'm looking for a resource
that goes into this sort of depth rather than just covering forms and
data processing.  So far the O'Reilly book, "Learning Cocoa with
Objective-C", doesn't seem to go into that sort of depth, although it
looks like it might be worth having anyway.

Anyway, thanks for any advice.

BTW, the sources I've found to be the most helpfull so far was a guide
in the Apple Media Architecture section of the web site (for getting
started with GL on OS X), and the Apple provided port of GLUT to OS X.

-- 
Joshua D. Boyd
jdboyd at jdboyd.net
http://www.jdboyd.net/
http://www.joshuaboyd.org/



More information about the geeks mailing list