• 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: Calling subclassed methods on Cocoa objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Calling subclassed methods on Cocoa objects (From: "David Piasecki" <email@hidden>)

  • Prev by Date: Re: source code
  • Next by Date: Re: source code
  • Previous by thread: Calling subclassed methods on Cocoa objects
  • Next by thread: Re: Calling subclassed methods on Cocoa objects
  • Index(es):
    • Date
    • Thread