Re: Observed behaviour - Is this expected
Re: Observed behaviour - Is this expected
- Subject: Re: Observed behaviour - Is this expected
- From: David Blanton <email@hidden>
- Date: Mon, 25 Jan 2010 21:18:50 -0700
OK. What I wanted was to have only one reference to the outlets in
the 'base class' that can be used in the sub classes.
I did not realize I had to connect the outlets defined in the base
class through the sub class.
I have the behavior I was expecting now.
Thanks Kyle for the pointer to the CocoaNibs.html
-db
On Jan 25, 2010, at 8:51 PM, Kyle Sluder wrote:
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