Re: Observed behaviour - Is this expected
Re: Observed behaviour - Is this expected
- Subject: Re: Observed behaviour - Is this expected
- From: Kyle Sluder <email@hidden>
- Date: Mon, 25 Jan 2010 19:51:31 -0800
On Mon, Jan 25, 2010 at 7:43 PM, David Blanton <email@hidden> wrote:
> Class A is a subclass of NSView
> Class B is a subclass of Class A
>
> Class A and Class B are in a NIB.
Classes don't live in nibs. You mean an object of class A and an
object of class B live in the nib.
> Class A as an Object - the blue cube
> Class B as a view in a window.
So your instance of A and your instance of B are entirely unrelated.
>
> When the program runs:
>
> Class A's init method is called
> Class B's awakeFromNib is called
> Class A's awakeFromNib is called
Class B will have been initialized with -initWithFrame:, as documented
in the Resource Programming Guide:
http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html
As the documentation explains, your instance of class A is encoded as
an object placeholder, whereas your instance of class B has been
encoded as a custom view placeholder.
--Kyle Sluder
_______________________________________________
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