• 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: Mac OS 10.5 can't find xib-instantiated subclass methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac OS 10.5 can't find xib-instantiated subclass methods


  • Subject: Re: Mac OS 10.5 can't find xib-instantiated subclass methods
  • From: Jerry Krinock <email@hidden>
  • Date: Tue, 8 Dec 2009 20:22:56 -0800

On 2009 Dec 08, at 18:36, Kyle Sluder wrote:

>> Now, since -awakeFromNib is implemented by NSObject
>
> Not before 10.6 it isn't.

Thank you, Kyle.  That was the problem, and since the runtime doesn't distinguish between subclass and superclass, the exception logged sent me looking down the wrong track.

I believe that, sometime between Nov 18 and Nov 29, I noticed that my -awakeFromNib implementations were not invoking super, and ignored my grandmother's advice to "never touch working code".

Correct way:

- (void)awakeFromNib {
    // Per Discussion in documentation of -[NSObject respondsToSelector:].
    // the superclass name in the following must be hard-coded.
    if ([NSTableView instancesRespondToSelector:@selector(awakeFromNib)]) {
        [super awakeFromNib] ;
    }

    ...
}

_______________________________________________

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

References: 
 >Mac OS 10.5 can't find xib-instantiated subclass methods (From: Jerry Krinock <email@hidden>)
 >Re: Mac OS 10.5 can't find xib-instantiated subclass methods (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Deleting entire sections in UITableView edit mode
  • Next by Date: Re: Unable to write in InfoPlist.strings file from cpp
  • Previous by thread: Re: Mac OS 10.5 can't find xib-instantiated subclass methods
  • Next by thread: Deleting entire sections in UITableView edit mode
  • Index(es):
    • Date
    • Thread