• 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: NIB Init method for window subclasses
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NIB Init method for window subclasses


  • Subject: Re: NIB Init method for window subclasses
  • From: Matt Neuburg <email@hidden>
  • Date: Wed, 25 Mar 2009 08:35:41 -0700
  • Thread-topic: NIB Init method for window subclasses

On Wed, 25 Mar 2009 09:43:55 +0700, Ryan Joseph
<email@hidden> said:
>I have a window in a NIB file which I have assigned a class in the
>"Class Identity" field and corresponding NSWindow subclass in code.
>According to the reference (which is copied below) I think I should be
>receiving a initWithCoder: message (there are only 3 options) but I
>never get it. Custom classes and NSViews are both receiving init and
>initWithFrame: respectively. Should NSWindow be getting this message
>when it is instantiated from a NIB? If not, how do I know when
>NSWindows are instantiated?

No.

>Standard Interface Builder objects (and custom subclasses of those
>objects) receive an initWithCoder: message.
>In Mac OS X, the list of standard objects includes the views, cells,
>menus, and view controllers that are provided by the system and
>available in the default Interface Builder library

That didn't mention windows.

If you are using a window subclass, you'll receive awakeFromNib. Subclassing
NSWindow, however, merely to get an early message, would be unnecessary.
More typical is to use one of the many fine notifications / delegate
messages provided by the framework.

Hope this helps - m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: Overriding -dealloc on any object
  • Next by Date: Re: [Q] Convert PixMapHandle to NSBitmapImageRep
  • Previous by thread: Re: NIB Init method for window subclasses
  • Next by thread: How to extract the basic info from an audio file?
  • Index(es):
    • Date
    • Thread