Re: Calling subclassed methods on Cocoa objects
Re: Calling subclassed methods on Cocoa objects
- Subject: Re: Calling subclassed methods on Cocoa objects
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 14 Apr 2004 13:16:21 -0600
On Apr 14, 2004, at 12:38 PM, David Piasecki wrote:
Then I created a method in MyImageView called SetObject which provides
a reference to a newly created object in MyController that I also want
to access in MyImageView. In the init method of MyController, I call
SetObject; however, when I debug the application, it seems that
SetObject never gets called.
That's because, if MyController is instantiated from a nib, then the
MyImageView object will not be linked to MyController until
-awakeFromNib is called. Until -awakeFromNib is called, the MyImageView
outlet will be nil, and sending a message to a nil pointer does
nothing. So try writing an -awakeFromNib method in MyController if you
haven't already, and then move that call over to -awakeFromNib...
Nick Zitzmann
<
http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.