Mac OS 10.5 can't find xib-instantiated subclass methods
Mac OS 10.5 can't find xib-instantiated subclass methods
- Subject: Mac OS 10.5 can't find xib-instantiated subclass methods
- From: Jerry Krinock <email@hidden>
- Date: Tue, 8 Dec 2009 18:22:17 -0800
"All of a sudden", an app which I'm building won't display complete windows when running in Mac OS 10.5. While loading a window, -awakeFromNib is not found for subclasses that are instantiated in a xib. Examples:
*** -[ContentOutlineView awakeFromNib]: unrecognized selector sent to instance 0x1640c040
*** -[StarkTableColumn awakeFromNib]: unrecognized selector sent to instance 0x166296b0
*** -[FindTableView awakeFromNib]: unrecognized selector sent to instance 0x16866460
Now, since -awakeFromNib is implemented by NSObject, it should NEVER be unrecognized for any subclass of NSObject, which all of the above classes are...
ContentOutlineView : NSOutlineView
StarkTableColumn : NSTableColumn
FindTableView : NSTableView
These subclasses are implemented in a private framework which is packaged in the app. Since I have Mac OS 10.5.8 on another partition, I test the same build, from my Builds/Debug folder, which works perfectly in 10.6.
To make sure that I'm not on drugs, I ran Steve Nygard's class-dump tool in 10.5, and in 10.6, on the same unstripped framework executable, and BBEdit says the two outputs are identical. Here's a snippet from a class-dump output:
@interface StarkTableColumn : NSTableColumn
{
NSString *userDefinedAttribute;
NSFont *userDefinedMenuFont;
}
- (void)awakeFromNib;
...
You see, class-dump says that -awakeFromNib is implemented. (Of course, it's an override.) Why can't Mac OS 10.5 find it?
The really odd thing about this is that it seems to have no trouble finding the subclasses themselves. I mean, it does NOT say "Can't find ContentOutlineView, using NSOutlineView instead".
App and framework target's "Base SDK" are set to Mac OS 10.5; compiler is gcc 4.2. The affected classes are all subclasses which I have defined in my code, and are instantiated in a xib.
I recently upgraded my development environment from 10.5 with Xcode 3.1 to 10.6 with Xcode 3.2.1. However I just retested archived builds and found that this was apparently "not quite" the cause:
Nov 16: Version built on this day works OK.
Nov 18: Upgraded dev Mac from 10.5 to 10.6.
Nov 23: Version built on this day work OK.
Nov 29: Version built on this day is Bad.
Dec 07: Version built on this day is Bad.
Any guesses as to what might I have done to cause this disaster?
Thank you,
Jerry Krinock_______________________________________________
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