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 protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]