• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa Open GL help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Open GL help


  • Subject: Re: Cocoa Open GL help
  • From: Vince DeMarco <email@hidden>
  • Date: Tue, 11 Sep 2001 14:55:46 -0700

On Tuesday, September 11, 2001, at 11:43 am, Raphael Sebbe wrote:

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 ?


initWithFrame: will only get called for a CustomView, or in the case of a customobject we will call init.

In every other case we basically go though the NSCoder stuff and call initWithCoder: when the object gets read out of the nib file.

But i would not recommend over riding the initWithCoder: (unless you are really careful). Just add a awakeFromNib method and do the initialization that you need there. awakeFromNib gets called on all of the objects in the nib after all of the connections have been made. This is the safest way of doing this.

vince


  • Follow-Ups:
    • Re: Cocoa Open GL help
      • From: Raphael Sebbe <email@hidden>
References: 
 >Re: Cocoa Open GL help (From: Raphael Sebbe <email@hidden>)

  • Prev by Date: Re: FIFOs.
  • Next by Date: FW: Mac OS X 10.1 File Name Extensions -- chuck em!
  • Previous by thread: Re: Cocoa Open GL help
  • Next by thread: Re: Cocoa Open GL help
  • Index(es):
    • Date
    • Thread