Edit AllPages

Describe InitWithFrameNSOpenGL here.

Any particular reason why my custom NSOpenGLView is not getting it’s (id)initWithFrame:(NSRect)frameRect method called? All my other overriden methods are getting called just fine (like mouseDown:, keyDown:). I know it’s something simple, but I can’t figure it out.


The general answer: Read up on the concept of Designated Initializer.

Initializing an NSOpenGLView � initWithFrame:pixelFormat: Initializes a newly allocated NSOpenGLView with frameRect as its frame rectangle and format as its pixel format.

The specific answer: (Are you using a custom view or an NSOpenGLView with Interface Builder ?) See also