I have a subclass of NSOpenGLView which named POpenGLView. I tried two ways to use it in IB:
Method 1: To create an OpenGL view in IB directly, and set its class type "POpenGLView". Method 2: To create a NSView in IB, and set its class type "POpenGLView". The most significant difference between the two ways is - in Method 2, initWithFrame: is invoked. - in Method 1, initWithCoder: is invoked. I checked Apple examples and found this one: http://developer.apple.com/library/mac/#samplecode/GLEssentials/Listings/main_m.html#//apple_ref/doc/uid/DTS40010104-main_m-DontLinkElementID_31 Apple's example takes Method 2 and relies on the behavior of invoking initWithFrame: . What's the rule of IB/XIB regarding picking instantiate method? Thanks, Dong _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com