Re: Cocoa Open GL help
Re: Cocoa Open GL help
- Subject: Re: Cocoa Open GL help
- From: Raphael Sebbe <email@hidden>
- Date: Tue, 11 Sep 2001 20:43:42 +0200
It seems to me it is exactly how it is intended to be used from the
previous posts : a custom (I mean user defined) NSView subclass
(NSOpenGLView subclass, in fact) inside a window, but I admit my answer
was perhaps too much general/incorrect...
To better clarify this, does it mean that views that stand on their own
(not in a window) in the nib file do not receive -initWithFrame: ? Are
there other situations in which initWithFrame: would not be invoked on
user-defined NSView subclasses ?
Raphael
On Tuesday, September 11, 2001, at 07:57 PM, Vince DeMarco wrote:
On Tuesday, September 11, 2001, at 06:11 am, Raphael Sebbe wrote:
objects in nib files are inited with :
-initWithFrame: (NSView subclasses)
-init (other objects)
So, you should override initWithFrame, I believe.
-awakeFromNib, on the other hand is invoked after all nib objects have
been brought to life.
This is completely wrong.
here is a note we added in the IB FAQ to explain this.
Why isn't my initWithFrame: method called?
initWithFrame: is only called when you have added a Custom View object
to your window. The initWithFrame: message is sent to the class you
specified in the Attributes Info Panel. Other widgets will not recieve
initWithFrame:
messages. In this case you should just implement a -(void)awakeFromNib
method to handle any further setup at runtime
vince
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev