• 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: Larry Fransson <email@hidden>
  • Date: Wed, 14 Apr 2004 12:41:39 -0700

On Apr 14, 2004, at 11:38, David Piasecki wrote:

In the init method of MyController, I call SetObject; however, when I debug the application, it seems that SetObject never gets called. Perhaps MyController needs to be initialized before I do any operations on its objects? How else might I have both MyController and MyImageView reference the same object?

- (void)init
{
[myimage SetObject:sharedObject];
}

1. Certainly, everything must be initialized before you can work on anything. If it hasn't been initialized, it's probably nil, and you can perform operations on nil all day long with no complaints from the system.

2. Anything you want done to the interface when starting should be done in the -awakeFromNib method. That gets called once the nib file has been unpacked and all of the interface connections have been made.

Larry Fransson
Seattle, WA
_______________________________________________
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: Setting env vars from Cocoa with /bin/sh?
  • Previous by thread: Re: Calling subclassed methods on Cocoa objects
  • Next by thread: Re: Calling subclassed methods on Cocoa objects
  • Index(es):
    • Date
    • Thread