• 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: Details and the concepts related to the Nib Window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Details and the concepts related to the Nib Window


  • Subject: Re: Details and the concepts related to the Nib Window
  • From: James Bucanek <email@hidden>
  • Date: Tue, 23 Mar 2010 08:39:05 -0700

Jon Pugh <mailto:email@hidden> wrote (Monday, March 22, 2010 11:22 PM -0700):

I presume he means via a breakpoint in the debugger.  Typically people put a
breakpoint in init and don't see it being hit because init isn't called,
initWithCoder is what is used when unarchiving objects from a nib, but that's
a tough one to break in.

Just for completeness:

o Generally, objects that IB understands (i.e. the objects in the Library) are instantiated using -initWithCoder:. This is how IB initializes the object with the properties that you've defined in IB.

o Custom subclasses of NSObject are instantiated with -init (this is so you don't have to make an object conform to NSCoding to use it in IB).

o Custom subclasses of NSView are instantiated with -initWithFrame: (to be consistent with NSView's designated constructor, and also to avoid the NSCoding requirement).

Typically, the first place your Interface Builder objects/delegates get called
is awakeFromNib.  That's the place to put a breakpoint where you can see the
things you created in Interface Builder.

Agreed!

--
James Bucanek

_______________________________________________

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


References: 
 >Re: Details and the concepts related to the Nib Window (From: Jon Pugh <email@hidden>)

  • Prev by Date: Re: Screen size in Dual monitor mode
  • Next by Date: Re: Attempt to nest an NSCollectionView fails.
  • Previous by thread: Re: Details and the concepts related to the Nib Window
  • Next by thread: Re: Details and the concepts related to the Nib Window
  • Index(es):
    • Date
    • Thread