Re: Cocoa Open GL help
Re: Cocoa Open GL help
- Subject: Re: Cocoa Open GL help
- From: Vince DeMarco <email@hidden>
- Date: Wed, 12 Sep 2001 09:35:42 -0700
On Wednesday, September 12, 2001, at 09:26 am, Carlos Weber wrote:
On Wednesday, September 12, 2001, at 05:53 , Vince DeMarco wrote:
If you use a CustomView and set the class to MyOpenGLView then
initWithFrame: will get called but if MyOpenGLView is set as a custom
class to the NSOpenGLView that you drag in from the palette, the
initWithFrame: method on MyOpenGLView will never get called.
Am i just confusing everyone or is this explanation helping????
I think the confusion is between the above two different methods (in IB)
of getting an NSOpenGLView (or custom subclass thereof) into your view or
window: starting with dragging a CustomView widget (initWithFrame: is
called) versus starting with the NSOpenGLView widget (initWithFrame:
never called if you have subclassed). There are example projects out
there employing both methods, and until this distinction registered with
me it was difficult for me to figure out why things were being done so
differently in the different examples.
The only reason to do the CustomClass version is that you want to set some
properties of the widget in IB, and not do it via code as you would have
to with the other method.
vince